Skip to content

Commit eca606d

Browse files
xw285cornellfacebook-github-bot
authored andcommitted
Unify the cuda and hip path for fbgemm in trainer embedding pruning (#2137)
Summary: Pull Request resolved: #2137 Unifying the hip and cuda path so that we don't have to diverge in the user land. In addition, absorbed D58226889 and fixed the compat issue. Reviewed By: jimmyyou, Yuzhen11, joebos Differential Revision: D58775111 fbshipit-source-id: 23873deb59cd63c93b19fe597c3b22a50016d11a
1 parent 82c6977 commit eca606d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

torchrec/modules/itep_modules.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@
1717
from torchrec.sparse.jagged_tensor import _pin_and_move, _to_offsets, KeyedJaggedTensor
1818

1919
try:
20-
if torch.version.hip:
21-
torch.ops.load_library(
22-
"//deeplearning/fbgemm/fbgemm_gpu:intraining_embedding_pruning_hip"
23-
)
24-
else:
25-
torch.ops.load_library(
26-
"//deeplearning/fbgemm/fbgemm_gpu:intraining_embedding_pruning_cuda"
27-
)
20+
torch.ops.load_library(
21+
"//deeplearning/fbgemm/fbgemm_gpu:intraining_embedding_pruning"
22+
)
2823
except OSError:
2924
pass
3025

0 commit comments

Comments
 (0)