Skip to content

Commit 0a1b97a

Browse files
malaybagfacebook-github-bot
authored andcommitted
Exclude export code path in _use_segment_sum_csr (#3282)
Summary: Pull Request resolved: #3282 Similar to pt2 compilation path, export path will also not work without concrete stride values. Reviewed By: angelayi Differential Revision: D80217808 fbshipit-source-id: 00a21de8332e8106bb91421a41fdd2be622262a2
1 parent 29e4a4b commit 0a1b97a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrec/sparse/jagged_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ def _use_segment_sum_csr(stride_per_key: List[int]) -> bool:
11301130
per segment that match performance between the kernel and PyTorch solution, to
11311131
determine the threshold of when to use `segment_sum_csr`.
11321132
"""
1133-
if is_torchdynamo_compiling():
1133+
if is_pt2_compiling():
11341134
# dynamo symbolic shapes can not pass this condition without concrete stride values
11351135
return False
11361136

0 commit comments

Comments
 (0)