|
|
|
@ -117,19 +117,19 @@ class TestProfiler(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
def test_cpu_profiler(self):
|
|
|
|
|
self.net_profiler('CPU', "Default")
|
|
|
|
|
self.net_profiler('CPU', "Default", use_parallel_executor=True)
|
|
|
|
|
#self.net_profiler('CPU', "Default", use_parallel_executor=True)
|
|
|
|
|
|
|
|
|
|
@unittest.skipIf(not core.is_compiled_with_cuda(),
|
|
|
|
|
"profiler is enabled only with GPU")
|
|
|
|
|
def test_cuda_profiler(self):
|
|
|
|
|
self.net_profiler('GPU', "OpDetail")
|
|
|
|
|
self.net_profiler('GPU', "OpDetail", use_parallel_executor=True)
|
|
|
|
|
#self.net_profiler('GPU', "OpDetail", use_parallel_executor=True)
|
|
|
|
|
|
|
|
|
|
@unittest.skipIf(not core.is_compiled_with_cuda(),
|
|
|
|
|
"profiler is enabled only with GPU")
|
|
|
|
|
def test_all_profiler(self):
|
|
|
|
|
self.net_profiler('All', "AllOpDetail")
|
|
|
|
|
self.net_profiler('All', "AllOpDetail", use_parallel_executor=True)
|
|
|
|
|
#self.net_profiler('All', "AllOpDetail", use_parallel_executor=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|