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

Wrong device in ttv_tensor.py bug fixed #16

Merged
merged 12 commits into from
Dec 18, 2023
Merged

Conversation

alfatum
Copy link

@alfatum alfatum commented Dec 18, 2023

Fix for this bug:

File ".../pyCP_APR/pyCP_APR/torch_backend/ttv_sptensor.py", line 55, in ttv
    newsubs = subs[:, remdims]
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cuda:1)

Bug can be reproduced by setting device_num != 0 in CP_APR and fitting the model. Example:

cp_apr = CP_APR(n_iters=15, random_state=42, verbose=1, method='torch', device='gpu', device_num=1)
factors = cp_apr.fit(coords=train_coords, values=train_values, rank=[1,5])

MaksimEkin and others added 12 commits June 30, 2021 22:57
Improvements to the README.
Organize documentation and README.
Small fix on the SmartTensors link.
Re-organize the Numpy and PyTorch Backend. Add remaining of the tensor utilities.
@MaksimEkin MaksimEkin changed the base branch from main to develop December 18, 2023 20:16
@MaksimEkin MaksimEkin merged commit 129c948 into lanl:develop Dec 18, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants