From 40eed87930e5faf5f121a46cd2132485475e6bac Mon Sep 17 00:00:00 2001 From: atalman Date: Fri, 12 Jan 2024 13:08:09 -0800 Subject: [PATCH] Run test ops tests from outside of pytorch root folder --- .github/scripts/validate_test_ops.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/validate_test_ops.sh b/.github/scripts/validate_test_ops.sh index 0578d5ed9..12963f289 100644 --- a/.github/scripts/validate_test_ops.sh +++ b/.github/scripts/validate_test_ops.sh @@ -20,7 +20,7 @@ pushd pytorch pip install expecttest numpy pyyaml jinja2 packaging hypothesis unittest-xml-reporting scipy -# Run pytorch cuda wheels validation +# Run pytorch cuda wheels validation # Detect ReduceLogicKernel (ReduceOp and kernel) IMA python test/test_ops.py -k test_dtypes_all_cuda # Detect BinaryMulKernel (elementwise binary functor internal mul) IMA @@ -29,7 +29,10 @@ python test/test_torch.py -k test_index_reduce_reduce_prod_cuda_int32 python test/test_binary_ufuncs.py -k test_contig_vs_every_other___rand___cuda_int32 # Detect MaxMinElementwiseKernel (maximum) IMA python test/test_schema_check.py -k test_schema_correctness_clamp_cuda_int8 + +pushd /tmp # Detect StepKernel (nextafter) IMA python -c "import torch; print(torch.nextafter(torch.tensor([-4.5149, -5.9053, -0.9516, -2.3615, 1.5591], device='cuda:0'), torch.tensor(3.8075, device='cuda:0')))" # Detect BinaryGeometricKernels (atan2) IMA python -c "import torch; x = (torch.randn((2,1,1), dtype=torch.float, device='cuda')*5).to(torch.float32); y=(torch.randn((), dtype=torch.float, device='cuda')*5).to(torch.float32); print(torch.atan2(x,y))" +popd