Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion fbgemm_gpu/fbgemm_gpu/tbe/ssd/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ def _prefetch( # noqa C901
torch.tensor(
[weights.shape[0]], device="cpu", dtype=torch.long
),
weights.cpu().view(torch.float32).view(-1, 2),
weights.cpu(),
)

# Generate row addresses (pointing to either L1 or the current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ class DramKVEmbeddingCache : public kv_db::EmbeddingKVDB {
CHECK_EQ(indices.size(0), engege_rates.size(0));
auto indices_data_ptr = indices.data_ptr<index_t>();
auto engage_rate_ptr = engege_rates.data_ptr<float>();
int64_t stride = 2;
{
auto before_write_lock_ts =
facebook::WallClockUtil::NowInUsecFast();
Expand All @@ -783,8 +782,7 @@ class DramKVEmbeddingCache : public kv_db::EmbeddingKVDB {
index_iter++) {
const auto& id_index = *index_iter;
auto id = int64_t(indices_data_ptr[id_index]);
float engege_rate =
float(engage_rate_ptr[id_index * stride + 0]);
float engege_rate = float(engage_rate_ptr[id_index]);
// use mempool
weight_type* block = nullptr;
auto before_lookup_cache_ts =
Expand Down
Loading