Skip to content

Commit

Permalink
[ROCm] Fix test_trace_rule_update.py (pytorch#121524)
Browse files Browse the repository at this point in the history
-Add missing torch API to trace rules and ignore API with manual trace rule.

The PR fix test/dynamo/test_trace_rule_update

maybe related to pytorch#121142

Pull Request resolved: pytorch#121524
Approved by: https://github.com/jansel, https://github.com/pruthvistony
  • Loading branch information
petrex authored and pytorchmergebot committed Mar 25, 2024
1 parent bc7f385 commit 46a76cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/dynamo/test_trace_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
# Ignored because they have manual rules defined at `trace_rules.manual_torch_name_rule_map`.
"torch._nested_tensor_from_mask",
"torch._nested_from_padded",
"torch.sparse_compressed_tensor",
"torch.sparse_bsc_tensor",
"torch.sparse_bsr_tensor",
"torch.sparse_coo_tensor",
"torch.sparse_csc_tensor",
"torch.sparse_csr_tensor",
"torch.cuda._get_device_properties",
# Ignored and go through rules defined at `trace_rules.check`.
"torch._functionalize_are_all_mutations_under_no_grad_or_inference_mode",
"torch._cslt_sparse_mm_search",
Expand Down Expand Up @@ -62,7 +69,13 @@
"torch._test_parallel_materialize",
"torch._C._storage_address",
"torch._C._pickle_save",
"torch.cuda._get_device_properties",
"torch._validate_sparse_compressed_tensor_args",
"torch._validate_sparse_csr_tensor_args",
"torch._validate_sparse_bsr_tensor_args",
"torch._validate_sparse_csc_tensor_args",
"torch._validate_sparse_coo_tensor_args",
"torch._validate_sparse_bsc_tensor_args",
"torch._validate_compressed_sparse_indices",
}
if torch._C._llvm_enabled():
ignored_c_binding_in_graph_function_names |= {
Expand Down
1 change: 1 addition & 0 deletions torch/_dynamo/trace_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,7 @@
"torch._linalg_check_errors",
"torch._linalg_det",
"torch._linalg_eigh",
"torch._linalg_eigvals",
"torch._linalg_slogdet",
"torch._linalg_solve_ex",
"torch._linalg_svd",
Expand Down

0 comments on commit 46a76cf

Please sign in to comment.