Skip to content
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

Mark weights unbacked #2583

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
5 changes: 4 additions & 1 deletion torchrec/pt2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ def kjt_for_pt2_tracing(

values = kjt.values().long()
torch._dynamo.decorators.mark_unbacked(values, 0)
weights = kjt.weights_or_none()
if weights is not None:
torch._dynamo.decorators.mark_unbacked(weights, 0)

return KeyedJaggedTensor(
keys=kjt.keys(),
values=values,
lengths=lengths,
weights=kjt.weights_or_none(),
weights=weights,
stride=stride if not is_vb else None,
stride_per_key_per_rank=kjt.stride_per_key_per_rank() if is_vb else None,
inverse_indices=inverse_indices,
Expand Down
Loading