Skip to content

Commit 526902f

Browse files
Zheng-Yong (Arsa) Angfacebook-github-bot
authored andcommitted
explicitly disable pt2 compile on gauc (#2703)
Summary: Pull Request resolved: #2703 Context: the recent changes to GAUC have made it incompatible with PT2 compile, thus causing several issues with launching jobs on the latest trunk. After some digging, it turns out that the incompatibility lies with `torch.Tensor.item()`: pytorch/pytorch#130917. This diff: explicitly disables PT2 compilation on the problematic function, thus preventing training jobs from crashing due to incompatibility with PT2 compile. Reviewed By: shz117 Differential Revision: D68629159 fbshipit-source-id: 7cac0c6ebe720f02033ac807a47315fb20996595
1 parent 4d7b7ff commit 526902f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torchrec/metrics/gauc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def to_3d(
100100
return torch.ops.fbgemm.jagged_2d_to_dense(tensor_2d, offsets, max_length)
101101

102102

103+
@torch.compiler.disable
103104
def get_auc_states(
104105
labels: torch.Tensor,
105106
predictions: torch.Tensor,

0 commit comments

Comments
 (0)