

'''simple docstring'''



import os
import time

import numpy as np
import onnxruntime as ort


__snake_case			:     List[str]										=      '1'
__snake_case			:     Optional[int]										=      '0'
__snake_case			:     Dict										=      '1'

__snake_case			:     Dict										=      ort.SessionOptions()
__snake_case			:     Optional[int]										=      ort.GraphOptimizationLevel.ORT_DISABLE_ALL
print('Create inference session...')
__snake_case			:     int										=      ['TensorrtExecutionProvider', 'CUDAExecutionProvider']
__snake_case			:     Optional[Any]										=      ort.InferenceSession('model.onnx', sess_options=sess_opt, providers=execution_provider)
__snake_case			:     Optional[Any]										=      ort.RunOptions()

__snake_case			:     int										=      128
__snake_case			:     List[str]										=      1
__snake_case			:     Optional[int]										=      np.ones((batch, sequence), dtype=np.intaa)
__snake_case			:     str										=      np.ones((batch, sequence), dtype=np.intaa)
__snake_case			:     str										=      np.ones((batch, sequence), dtype=np.intaa)

print('Warm up phase...')
sess.run(
    None,
    {
        sess.get_inputs()[0].name: input_ids,
        sess.get_inputs()[1].name: attention_mask,
        sess.get_inputs()[2].name: token_type_ids,
    },
    run_options=run_opt,
)

print('Start inference...')
__snake_case			:     List[Any]										=      time.time()
__snake_case			:     Tuple										=      2000
__snake_case			:     List[Any]										=      {}
for iter in range(max_iters):
  __snake_case			:     Optional[int]										=      sess.run(
      None,
      {
          sess.get_inputs()[0].name: input_ids,
          sess.get_inputs()[1].name: attention_mask,
          sess.get_inputs()[2].name: token_type_ids,
      },
      run_options=run_opt,
  )
print('Average Inference Time = {:.3f} ms'.format((time.time() - start_time) * 1000 / max_iters))




'''simple docstring'''



from __future__ import annotations
def 						__lowerCamelCase	(       __snake_case					:		list[int]	)	->							bool:






						"""simple docstring"""





						return len(set(__snake_case	)	) == len(__snake_case	)


if __name__ == "__main__":
		import doctest

		doctest.testmod()

