Example #1
0
 def test_profiler_cpu(self):
     input_model_path = _get_test_model_path('bert_keras_squad')
     self.run_profile(
         f'--model {input_model_path} --batch_size 1 --sequence_length 7 --use_dummy_inputs'
     )
Example #2
0
 def test_profiler_cpu(self):
     input_model_path = _get_test_model_path("bert_keras_squad")
     self.run_profile(
         f"--model {input_model_path} --batch_size 1 --sequence_length 7 --dummy_inputs default"
     )
Example #3
0
 def test_profiler_gpu(self):
     input_model_path = _get_test_model_path('bert_keras_squad')
     if 'CUDAExecutionProvider' in onnxruntime.get_available_providers():
         self.run_profile(
             f'--model {input_model_path} --batch_size 1 --sequence_length 7 --use_gpu'
         )
Example #4
0
 def test_profiler_gpu(self):
     input_model_path = _get_test_model_path("bert_keras_squad")
     if self.test_cuda:
         self.run_profile(
             f"--model {input_model_path} --batch_size 1 --sequence_length 7 --use_gpu"
         )