Skip to content
Merged
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 merlin/loader/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _pull_values_offsets(self, values_offset):
offsets = torch.arange(values.size()[0], device=self.device)
num_rows = len(offsets)
if HAS_GPU:
offsets = torch.cat([offsets, torch.cuda.LongTensor([len(values)])])
offsets = torch.cat([offsets, torch.cuda.LongTensor([len(values)], device=self.device)])
else:
offsets = torch.cat([offsets, torch.LongTensor([len(values)])])
diff_offsets = offsets[1:] - offsets[:-1]
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ commands =
python -m pytest --cov-report term --cov=merlin -rxs tests/unit

[testenv:test-gpu]
passenv =
NR_USER
Comment on lines +26 to +27
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tox blocks all environment variables by default. We need to pass this in order to skip this test that uses horovod. The test was skipped previously because horovod was not installed in the ci runner image, but horovod was recently installed in the ci runner image because of multi-gpu support in Models.

sitepackages=true
; Runs in: Internal Jenkins
; Runs GPU-based tests.
Expand Down