The alpha/beta variables, residing on the host, should have the
32-bit or 64-bit width of the result type. It was formerly always
passed as double.
Details
- Reviewers
Peiming K-Wu - Commits
- rG4ebd836d9e7b: [mlir][sparse][gpu] fix F32 bug for SpMV and SpMM
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | This is indeed magic :-) I would suggest change it to make it a little bit safer from name collision |
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | You mean adding the variable names as parameter too? |
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | Oh I mean adding extra braces around alphaf, etc But adding the variable name as parameter might be a good idea too. |
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | Oh, braces too. I think in that case, the locals go out of scope at the closing } But see if you like the new magic better. It is really just to avoid repeating the same block of code over and over again, while keeping it local scope |
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | Yeah, that's why I still keep alphap out of the scope (only variable ending with -f and -d are in local scope). |
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | ||
---|---|---|
251–260 | NVM, you are right ;-) |
This is indeed magic :-)
I would suggest change it to make it a little bit safer from name collision