Skip to content

Commit 93d9057

Browse files
committed
Fix: temporarily disable NON_BLOCKING because of unsoundness concerns
1 parent d59818c commit 93d9057

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/cust/src/stream.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ bitflags::bitflags! {
2727

2828
/// This stream does not synchronize with the NULL stream.
2929
///
30+
/// **Note: this flag has been temporarily disabled because of [soundness concerns](https://github.com/Rust-GPU/Rust-CUDA/issues/15)**
31+
///
3032
/// Note that the name is chosen to correspond to CUDA documentation, but is nevertheless
3133
/// misleading. All work within a single stream is ordered and asynchronous regardless
3234
/// of whether this flag is set. All streams in cust may execute work concurrently,
@@ -83,7 +85,9 @@ impl Stream {
8385
/// # Ok(())
8486
/// # }
8587
/// ```
86-
pub fn new(flags: StreamFlags, priority: Option<i32>) -> CudaResult<Self> {
88+
pub fn new(mut flags: StreamFlags, priority: Option<i32>) -> CudaResult<Self> {
89+
// NOTE(RDambrosio016): See https://github.com/Rust-GPU/Rust-CUDA/issues/15
90+
flags.remove(StreamFlags::NON_BLOCKING);
8791
unsafe {
8892
let mut stream = Stream {
8993
inner: ptr::null_mut(),

0 commit comments

Comments
 (0)