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

dividing a float16 tensor by a python float is inaccurate with nvfuser #1724

Open
beverlylytle opened this issue Jan 30, 2025 · 1 comment
Open
Labels

Comments

@beverlylytle
Copy link
Collaborator

beverlylytle commented Jan 30, 2025

The sample case of test_core_vs_torch_consistency_div_nvfuser_cuda_thunder.dtypes.float16 which uses a python float as the denominator fails with numerical inaccuracy. If the same sample is run with a tensor with empty shape, the test passes. Specifically, if .item() is deleted from this line, the test passes.

cc @tfogal

@mruberry
Copy link
Collaborator

@beverlylytle, thank you for filing this issue. I know you're not suggesting otherwise, but if anyone else is reading this, it's OK to have a sampleinput that tests fp16 tensor / pyfloat, because that's a real supported input to div. We should figure out what's going on and see if we can fix it (or maybe just widen the test's tolerances)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants