Skip to content

Commit 509ef36

Browse files
committed
docs(cuda): clarify context construction failure safety
Signed-off-by: Alexander Droste <[email protected]>
1 parent 5c936de commit 509ef36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎vortex-cuda/driver/src/context.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ impl CudaContext {
100100

101101
/// The device with `ordinal`, and whether its allocations can be stream-ordered.
102102
///
103-
/// Everything that can fail is queried here, before a context is retained or created, so
104-
/// that no failure leaves one behind.
103+
/// Query capabilities before retaining or creating a context, so a query failure cannot
104+
/// leak it. After acquisition, `wrap` establishes ownership before binding can fail.
105105
fn device(ordinal: usize) -> Result<(sys::CUdevice, bool), DriverError> {
106106
result::init()?;
107107
let device = result::device::get(

0 commit comments

Comments
 (0)