Some questions about iree cuda backend #17904
Unanswered
xiaoxuan-yu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to run StableHLO with cpp interface provided by IREE. I refered to https://github.com/iree-org/iree-template-runtime-cmake as an entry point. It runs perfectly when using llvm-cpu and local-sync. But when I tried to use CUDA as backend, I failed to get the things done correctly. The mlir I used is
which is exported from JAX and can work well when using llvm-cpu backend. And the C code is as below
I simply changed the compile command to
iree-compile --iree-hal-target-backends=cuda --iree-hal-cuda-llvm-target-arch=sm_75 mul.mlir -o build/mul.vmfb
first but the output shows that "PERMISSION_DENIED; buffer memory type is not compatible with the requested operation; buffer has DEVICE_LOCAL, operation requires HOST_VISIBLE". I searched the issues and noticed that non-mappable buffers are used by default, so I tried to add--iree-stream-external-resources-mappable=true
flag and the program gave out the right result, but without printing of lhs and rhs buffer views.Does anyone knows what happened? Besides, due to the lack of doc, I do not understand how to use non-mappable buffers correctly without adding the flag
--iree-stream-external-resources-mappable=true
. Looking forward to your reply.Beta Was this translation helpful? Give feedback.
All reactions