o
    i                     @   s4   d Z ddlZddlmZ dd Zd	ddZe ZdS )
z#
Methods related to notifications.
    N)_ufunc_configc                  C   s    t dtfi } tjd| d | S )NFallbackWarningalways)actioncategory)typeWarningwarningssimplefilter)r    r   ]/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/cupyx/fallback_mode/notification.py_init_warnings
   s   r   Fc                 C   s0  t  }t| dd}t| dd}|s;|r|rd|||}n|r*d|}|d7 }nd}|d7 }|r8d	|}n5d
}n2|rM|rMd|}|d||7 }n|rYd|}|d7 }nd}|d7 }|rkd|}|d7 }nd}|dkrztd| dS |dkrtj|tdd dS |dkrdS |dkrt|J )zA
    Dispatch notifications using appropriate dispatch type.
    
__module__N__name__z0'{}' method not in cupy, falling back to '{}.{}'z'{}' method not in cupy, z(falling back to its numpy implementationz&This method is not available in cupy, zfalling back to numpyz'{}' method not found in cupyz$This method is not available in cupyz%'{}' method is available in cupy but z'cannot be used, falling back to '{}.{}'z8cannot be used, falling back to its numpy implementationz4This method is available in cupy, but cannot be usedz!'{}' method is available in cupy zbut cannot be usedz3This method is available in cupy but cannot be usedprintzWarning: {}warn   )
stacklevelignoreraise)	r   get_config_fallback_modegetattrformatr   r	   r   r   AttributeError)funccupy_supportdispatch_type_module_namemsg	raise_msgr   r   r   _dispatch_notification   sN   






r!   )F)__doc__r	   cupyxr   r   r!   r   r   r   r   r   <module>   s    

;