Skip to content

Commit

Permalink
Update smoke_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman authored May 8, 2024
1 parent 981c9d6 commit 52b55d6
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ def load_json_from_basedir(filename: str):
def read_release_matrix():
return load_json_from_basedir("release_matrix.json")

def test_numpy():
import numpy as np
x = np.arange(5)
torch.tensor(x)

def check_version(package: str) -> None:
release_version = os.getenv("RELEASE_VERSION")
# if release_version is specified, use it to validate the packages
Expand Down Expand Up @@ -135,12 +130,9 @@ def test_cuda_runtime_errors_captured() -> None:
try:
print("Testing test_cuda_runtime_errors_captured")
torch._assert_async(torch.tensor(0, device="cuda"))
# torch._assert_async(torch.tensor(0 + 0j, device="cuda"))
except RuntimeError as e:
if re.search("CUDA", f"{e}"):
print(f"Caught CUDA exception with success: {e}")
# This is last check. We want to exit at this point
sys.exit(0)
else:
raise e

Expand Down Expand Up @@ -314,18 +306,7 @@ def main() -> None:
options = parser.parse_args()
print(f"torch: {torch.__version__}")

check_version(options.package)
smoke_test_conv2d()
test_linalg()
test_numpy()
if is_cuda_system:
test_linalg("cuda")

if options.package == "all":
smoke_test_modules()

smoke_test_cuda(options.package, options.runtime_error_check)
sys.exit(0)


if __name__ == "__main__":
Expand Down

0 comments on commit 52b55d6

Please sign in to comment.