3
H4W^  ã               @   s,  d Z ddlmZ ddlmZ ddlmZ ddlmZ ddljZddl	m
Z
 ddlmZ dd	lmZ ejZejZe
je
jd
�ZejejjrŽegng  Zdd„ Zdd„ Zeeƒ eƒ d�Zeejegƒejegƒd�Zeejegƒejegƒd�Zeejegƒejegƒd�Zeejeegƒejeegƒd�Z dS )z�
The MKL test utils is a small addition on top of the hypothesis test utils
under caffe2/python, which allows one to more easily test MKL related
operators.
é    )Úabsolute_import)Údivision)Úprint_function)Úunicode_literalsN)Ú
caffe2_pb2)Ú	workspace)Úhypothesis_test_util)Zdevice_typec               C   s
   t jtƒS )N)ÚstÚjustÚdevice_options© r   r   ú</tmp/pip-build-e66j97b2/torch/caffe2/python/mkl_test_util.pyÚdevice_checker_device_options   s    r   c               C   s
   t jtƒS )N)r	   Úsampled_fromr   r   r   r   r   Úgradient_checker_device_option   s    r   )ÚgcÚdc)!Ú__doc__Ú
__future__r   r   r   r   Zhypothesis.strategiesZ
strategiesr	   Zcaffe2.protor   Zcaffe2.pythonr   r   ÚhuZcpu_doZgpu_doZDeviceOptionZMKLDNNZmkl_dor   ÚCZ
has_mkldnnr   r   ÚdictZgcsr   r
   Zgcs_cpu_onlyZgcs_gpu_onlyZgcs_mkl_onlyZgcs_cpu_mklr   r   r   r   Ú<module>   s,   

