




import os
import time

import numpy as np
import onnxruntime as ort


lowerCAmelCase_						=			'1'
lowerCAmelCase_						=			'0'
lowerCAmelCase_						=			'1'

lowerCAmelCase_						=			ort.SessionOptions()
lowerCAmelCase_						=			ort.GraphOptimizationLevel.ORT_DISABLE_ALL
print('Create inference session...')
lowerCAmelCase_						=			['TensorrtExecutionProvider', 'CUDAExecutionProvider']
lowerCAmelCase_						=			ort.InferenceSession('model.onnx', sess_options=sess_opt, providers=execution_provider)
lowerCAmelCase_						=			ort.RunOptions()

lowerCAmelCase_						=			1_28
lowerCAmelCase_						=			1
lowerCAmelCase_						=			np.ones((batch, sequence), dtype=np.intaa)
lowerCAmelCase_						=			np.ones((batch, sequence), dtype=np.intaa)
lowerCAmelCase_						=			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...')
lowerCAmelCase_						=			time.time()
lowerCAmelCase_						=			20_00
lowerCAmelCase_						=			{}
for iter in range(max_iters):
 lowerCAmelCase_						=			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) * 10_00 / max_iters))





import math






def  snake_case(    __magic_name__   )			->							bool:





     '''simple docstring'''


     lowercase :       Union[str, Any]       =			math.loga(math.sqrt(4 * positive_integer + 1   ) / 2 + 1 / 2   )

     return exponent == int(__magic_name__   )






def  snake_case(    __magic_name__ = 1 / 1_23_45   )			->							int:





     '''simple docstring'''


     lowercase :       Union[str, Any]       =			0
     lowercase :       str       =			0

     lowercase :       Optional[int]       =			3
     while True:
          lowercase :       Any       =			(integer**2 - 1) / 4
          # if candidate is an integer, then there is a partition for k
          if partition_candidate == int(__magic_name__   ):
               lowercase :       Any       =			int(__magic_name__   )
               total_partitions += 1
               if check_partition_perfect(__magic_name__   ):
                    perfect_partitions += 1
          if perfect_partitions > 0:
               if perfect_partitions / total_partitions < max_proportion:
                    return int(__magic_name__   )
          integer += 1


if __name__ == "__main__":
 print(f'''{solution() = }''')