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

CUSPARSE: Better error msg for unsupported sparse mm #1467

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Roger-luo
Copy link
Contributor

currently when the element-type happens to be mix of Float32 and Float64 (which happens quite often for users when they use cu for the conversion) mul! will just call the generic fallback and if CUDA.allowscalar is not set, this would just throw a warning a while later.

This PR let this dispatch path just error since it's not supported for now anyways.

@Roger-luo
Copy link
Contributor Author

it seems CI failure unrelated to this PR

@maleadt
Copy link
Member

maleadt commented Apr 11, 2022

Although I like better error messages, which is why I filed #1271, I don't think that adding a lengthy implementation like this for every operation scales well. We need a simpler way to add such implementations (metaprogramming) or another way to detect the use of fallbacks. Isn't the scalar indexing error message clear enough?

@Roger-luo
Copy link
Contributor Author

Isn't the scalar indexing error message clear enough?

I think scalar indexing is just a general error for CUDA since it doesn't say anything about why it is scalar indexing, e.g most of cases I'd like to know whether it's because something is not implemented.

Yeah, I'm not sure what would be the best way to detect this type of interface overloading automatically, so I just did it manually since I hit this one quite often...

@kshyatt kshyatt added the cuda libraries Stuff about CUDA library wrappers. label May 7, 2022
@maleadt maleadt changed the title better error msg for unsupported sparse mm CUSPARSE: Better error msg for unsupported sparse mm May 18, 2022
@Roger-luo
Copy link
Contributor Author

OK just had another idea, what if we make a macro @not_supported for this? e.g

@not_supported <method signature>

this is probably more readable?

@maleadt
Copy link
Member

maleadt commented May 27, 2022

Yeah that seems like a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda libraries Stuff about CUDA library wrappers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants