Set simdlen based on ATEN_CPU_CAPABILITY (#123514)

It is part of https://github.com/pytorch/pytorch/issues/123224. Set simdlen based on the environment ATEN_CPU_CAPABILITY to control CPU vec ISA like eager.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/123514
Approved by: https://github.com/jgong5, https://github.com/peterbell10
This commit is contained in:
CaoE
2024-06-06 07:52:26 -07:00
committed by PyTorch MergeBot
parent df43d5843e
commit b66e3f0957
6 changed files with 205 additions and 19 deletions

View File

@ -381,6 +381,12 @@ def expectedFailureDynamicWrapper(fn):
return fn
def expectedFailureScalar(fn):
if os.getenv("ATEN_CPU_CAPABILITY") == "default":
return unittest.expectedFailure(fn)
return fn
def reset_rng_state(use_xla=False):
torch.manual_seed(1337)
random.seed(1337)