Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/driver/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,8 @@ pub mod external_memory {
},
},
size,
..Default::default()
flags: 0,
reserved: [0; 16],
};
sys::cuImportExternalMemory(external_memory.as_mut_ptr(), &handle_description).result()?;
Ok(external_memory.assume_init())
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ pub mod external_memory {
},
},
size,
..Default::default()
flags: 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The reserved field is missing here. The unix version of this function, import_external_memory_opaque_fd, conditionally includes the reserved field for cuda-13000. To ensure consistency and prevent compilation errors when the cuda-13000 feature is enabled, you should also include the reserved field here under the same conditional compilation flag.

            flags: 0,
            #[cfg(feature = "cuda-13000")]
            reserved: [0; 16],

};
sys::cudaImportExternalMemory(external_memory.as_mut_ptr(), &handle_description)
.result()?;
Expand Down
Loading