
"""simple docstring"""



def 					_UpperCAmelCase      ( __lowerCamelCase   :       str ,					__lowerCamelCase   :       str		)     ->					bool:
  _snake_case					     =       len(__lowerCamelCase		)
  _snake_case					     =       len(__lowerCamelCase		)
  _snake_case					     =       [[False for _ in range(m + 1		)] for _ in range(n + 1		)]
  _snake_case					     =       True
  for i in range(__lowerCamelCase		):
    for j in range(m + 1		):
      if dp[i][j]:
        if j < m and a[i].upper() == b[j]:
          _snake_case					     =       True
        if a[i].islower():
          _snake_case					     =       True
  return dp[n][m]


if __name__ == "__main__":
 import doctest

 doctest.testmod()





"""simple docstring"""



import os
import time

import numpy as np
import onnxruntime as ort


UpperCAmelCase__          = '1'
UpperCAmelCase__          = '0'
UpperCAmelCase__          = '1'

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

UpperCAmelCase__          = 128
UpperCAmelCase__          = 1
UpperCAmelCase__          = np.ones((batch, sequence), dtype=np.intaa)
UpperCAmelCase__          = np.ones((batch, sequence), dtype=np.intaa)
UpperCAmelCase__          = 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...')
UpperCAmelCase__          = time.time()
UpperCAmelCase__          = 2000
UpperCAmelCase__          = {}
for iter in range(max_iters):
 UpperCAmelCase__          = 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))



