# Use this with the LOGKERNS options to verify that all executed kernels are valid and evaluate to the same ground truth results
# Example for GPT2:
# 1) Run the model to log all kernels: `PYTHONPATH=. LOGKERNS=/tmp/gpt2_kerns.txt JIT=1 HALF=1 BEAM=2 CACHELEVEL=0 python3 examples/gpt2.py --count 10 --temperature 0 --timing` # noqa: E501
parser=argparse.ArgumentParser(description="Verify the correctness of one or more kernel",formatter_class=argparse.ArgumentDefaultsHelpFormatter)# noqa: E501
parser.add_argument("--kernel",type=str,default=None,help="a string of a tuple of (ast, applied_opts,)")
parser.add_argument("--file",type=str,default=None,help="a file containing a tuple of ast and applied_opts, one per line")
parser.add_argument("--pkl",type=str,default=None,help="a pickle file containing a single tuple of ast and applied_opts")
parser.add_argument("--rtol",type=float,default=1e-2,help="relative tolerance for numerical comparison")
parser.add_argument("--atol",type=float,default=1e-2,help="absolute tolerance for numerical comparison")
parser.add_argument("--timing",action='store_true',help="show final timing for the kernel")
parser.add_argument("--expected-failures",type=int,default=0,help="the number of expected failed kernels")