elixir-nx / nx_iree

Elixir and Nx bindings for the IREE runtime and compiler
Apache License 2.0
28 stars 2 forks source link

CUDA runtime error #5

Closed polvalente closed 2 months ago

polvalente commented 4 months ago

** (RuntimeError) IREE call failed due to: ~c"Failed to execute IREE runtime due to error: iree/runtime/src/iree/hal/drivers/cuda/native_executable.c:174: INTERNAL; CUDA error 'CUDA_ERROR_INVALID_CONTEXT' (201): invalid device context; while invoking native function hal.executable.create; while calling import; \n[ 1] native hal.executable.create:0 -\n[ 0] bytecode module.__init:280 /tmp/-576460752303423230-nx-iree-tempfile.mlir:6:10\n at /tmp/-576460752303423230-nx-iree-tempfile.mlir:2:3"

This is a known issue in IREE, and is probably an easy fix by adding these lines somewhere else where they're missing: https://github.com/elixir-nx/nx_iree/blob/6de5856fc0b031de4dd01a502b8f436cf8e22956/cmake/src/runtime.cc#L169-L176

polvalente commented 2 months ago

Solved by a520f9e