Skip to content

Commit

Permalink
[SmokeTest] Do not import invalid_vec_isa
Browse files Browse the repository at this point in the history
But rather coerce detected isa to bool, if it's false, that ISA is either invalid or unusable
  • Loading branch information
malfet committed Aug 15, 2024
1 parent 84f3c98 commit 00433df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ def foo(x: torch.Tensor) -> torch.Tensor:

# Check that SIMD were detected for the architecture
if device == "cpu":
from torch._inductor.codecache import pick_vec_isa, invalid_vec_isa
from torch._inductor.codecache import pick_vec_isa
isa = pick_vec_isa()
if isa == invalid_vec_isa:
if not isa:
raise RuntimeError("Can't detect vectorized ISA for CPU")
print(f"Picked CPU ISA {type(isa).__name__} bit width {isa.bit_width()}")

Expand Down

0 comments on commit 00433df

Please sign in to comment.