Skip to content

Commit 5f81c65

Browse files
committed
Make it clear that #[cuda_std::address_space(constant)] still works
1 parent 81936e1 commit 5f81c65

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

crates/cuda_builder/src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ pub struct CudaBuilder {
137137
/// errors (CUDA error code: `700`).
138138
///
139139
/// The default is `false`, which places all statics in global memory. This avoids
140-
/// such errors but may reduce performance and use more general memory.
140+
/// such errors but may reduce performance and use more general memory. When set to
141+
/// `false`, you can still annotate `static` variables with
142+
/// `#[cuda_std::address_space(constant)]` to place them in constant memory
143+
/// manually. This option only affects automatic placement.
141144
///
142145
/// Future versions may support smarter placement and user-controlled
143146
/// packing/spilling strategies.
@@ -304,7 +307,9 @@ impl CudaBuilder {
304307
/// errors (CUDA error code: `700`).
305308
///
306309
/// If `false`, all statics are placed in global memory. This avoids such errors but
307-
/// may reduce performance and use more general memory.
310+
/// may reduce performance and use more general memory. You can still annotate
311+
/// `static` variables with `#[cuda_std::address_space(constant)]` to place them in
312+
/// constant memory manually as this option only affects automatic placement.
308313
///
309314
/// Future versions may support smarter placement and user-controlled
310315
/// packing/spilling strategies.

0 commit comments

Comments
 (0)