10000 [inductor] Fix MKL issue with test_indirect_device_assert by jansel · Pull Request #108172 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[inductor] Fix MKL issue with test_indirect_device_assert #108172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update on "[inductor] Skip test_indirect_device_assert on RTX3090"
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov anijain2305

[ghstack-poisoned]
  • Loading branch information
jansel committed Aug 29, 2023
commit c068e16ca78541f3ddfa7c044b30b6dbbce813e9
5 changes: 3 additions & 2 deletions test/inductor/test_torchinductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
expectedFailureCodegenDynamic,
rand_strided,
same,
skip_if_consumer_card,
)
from torch._export.constraints import constrain_as_size
from torch._inductor.codegen.common import DataTypePropagation, OptimizationContext
Expand Down Expand Up @@ -7544,7 +7543,6 @@ def fn(x: torch.Tensor) -> torch.Tensor:
fn_opt(inps)

@skipIfRocm
@skip_if_consumer_card
@unittest.skipIf(IS_FBCODE, "fbcode system python does not provide torch")
def test_indirect_device_assert(self):
dir_path = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -7563,6 +7561,7 @@ def test_indirect_device_assert(self):
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env={**os.environ, "MKL_THREADING_LAYER": "GNU"},
)
stderr = proc.communicate()[1]
self.assertTrue(
Expand All @@ -7576,8 +7575,10 @@ def test_indirect_device_assert(self):
[sys.executable, test_path, "first_arg", "2", "False", "True"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env={**os.environ, "MKL_THREADING_LAYER": "GNU"},
)
stderr = proc.communicate()[1]

self.assertTrue(
any(
"index out of bounds" in err.decode("utf-8")
Expand Down
12 changes: 0 additions & 12 deletions torch/_dynamo/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ def wrapped(*args, **kwargs):
return wrapped


def skip_if_consumer_card(fn):
@functools.wraps(fn)
def wrapped(*args, **kwargs):
if torch.cuda.is_available() and re.search(
r"GeForce [GR]TX", torch.cuda.get_device_name()
):
raise unittest.SkipTest("does not work on consumer cards")
return fn(*args, **kwargs)

return wrapped


def named_parameters_for_optimized_module(mod):
assert isinstance(mod, eval_frame.OptimizedModule)
return mod._orig_mod.named_parameters
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0