mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[Inductor] Pick ISA for inductor based on ATEN_CPU_CAPABILITY (#123514)
It is part of https://github.com/pytorch/pytorch/issues/123224. Pick ISA based on the environment ATEN_CPU_CAPABILITY to control CPU vec ISA level for Inductor 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:
@ -148,7 +148,10 @@ class ExtensionBackendTests(TestCase):
|
||||
metrics.reset()
|
||||
opt_fn = torch.compile()(fn)
|
||||
_, code = run_and_get_cpp_code(opt_fn, x, y, z)
|
||||
if cpu_vec_isa.valid_vec_isa_list():
|
||||
if (
|
||||
cpu_vec_isa.valid_vec_isa_list()
|
||||
and os.getenv("ATEN_CPU_CAPABILITY") != "default"
|
||||
):
|
||||
load_expr = "loadu"
|
||||
else:
|
||||
load_expr = " = in_ptr0[static_cast<long>(i0)];"
|
||||
|
Reference in New Issue
Block a user