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

Bug Fix: NF4 .to('cuda') #158

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Bug Fix: NF4 .to('cuda') #158

merged 2 commits into from
Apr 23, 2024

Conversation

msaroufim
Copy link
Member

@msaroufim msaroufim commented Apr 22, 2024

h/t to @weifengpy for finding this workaround

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 22, 2024
Copy link
Contributor

@weifengpy weifengpy left a comment

Choose a reason for hiding this comment

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

this is fast :D

@cpuhrsch cpuhrsch merged commit ec6affe into main Apr 23, 2024
11 checks passed

inpt_tensor = torch.rand(128, device='cuda')
t = to_nf4(inpt_tensor, 32, 2)
assert t.device.type == "cuda"
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a test for empty_like as well?

@msaroufim msaroufim deleted the msaroufim/nf4copyfix branch April 23, 2024 01:55
dbyoung18 pushed a commit to dbyoung18/ao that referenced this pull request Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants