U
    ‰dG  ã                   @   sZ   d dl Z d dlmZ d dlmZmZ e  ej d¡G dd„ dejƒƒZ	e
dkrVe  ¡  dS )é    N)Úconvnet_benchmarks)Ú	test_utilÚ	workspacezno cuda gpuc                   @   s   e Zd Zdd„ ZdS )ÚTestConvnetBenchmarksc                 C   sP   ddg}t jt jt jt jfD ].}|D ]$}t  ¡  | d¡¡}t  ||¡ q$qd S )NzA--batch_size 16 --order NCHW --iterations 1 --warmup_iterations 1zP--batch_size 16 --order NCHW --iterations 1 --warmup_iterations 1 --forward_onlyú )	ÚcbZAlexNetZOverFeatZVGGAZ	InceptionZGetArgumentParserÚ
parse_argsÚsplitZ	Benchmark)ÚselfZall_argsÚmodelZarg_strÚargs© r   úI/tmp/pip-unpacked-wheel-ua33x9lu/caffe2/python/convnet_benchmarks_test.pyÚtestConvnetBenchmarks	   s    ýz+TestConvnetBenchmarks.testConvnetBenchmarksN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   Ú__main__)ZunittestZcaffe2.pythonr   r   r   r   ZskipIfZhas_cuda_supportZTestCaser   r   Úmainr   r   r   r   Ú<module>   s   