Skip to content

Commit

Permalink
Add basic numpy test (#1777)
Browse files Browse the repository at this point in the history
* Add basic numpy tests

* lint
  • Loading branch information
atalman authored Apr 8, 2024
1 parent 0f4e159 commit ef4a28a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ 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 @@ -307,6 +312,7 @@ def main() -> None:
check_version(options.package)
smoke_test_conv2d()
test_linalg()
test_numpy()
if is_cuda_system:
test_linalg("cuda")

Expand Down

0 comments on commit ef4a28a

Please sign in to comment.