Open chengchen666 opened 5 months ago
In my windows WSL ubuntu system, rust has no issue. Really weird behaviour.
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.76.0-nightly (d86d65bbc 2023-12-10)`
In host machine, different process will use different cuda context to do resource isolation. This should be the same for Quark. However, all process inside Quark will go into qvisor, which is a single process in Host. So, ideally, we should create different cuda context for processes in Quark. But now we decide to not distinguish cuda context, in another word, we will use single cuda context for all processes in quark. This is only a temporary workaround. One reason for this is for simplicity, another reason, which is the most important reason is: we are meeting some issues when create cuda context by using Rust. There's some bugs when we create cudaContext from a Rust program, but no issue from a C program. Error code from CUDA side shows OUT OF MEMORY, but actually we have enough GPU memory & RAM. And the logic are the same for Rust program and C program. And it shouldn't be any issue with the usage of cuda Context related APIs. Nothing relates to CUDA version or Quark itself. Must be some issue from Rust Runtime(if there's such thing). Will stop working on branch : https://github.com/QuarkContainer/Quark/tree/GPU-cuLibAndCtx
Here's the code for reproduce this issue: C code:
Rust code:
cargo.toml: