Skip to content

Commit 61a87cd

Browse files
committed
Add tracking issue for NVPTX intrinsics
1 parent c619e83 commit 61a87cd

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

crates/core_arch/src/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ pub mod arch {
258258
/// See the [module documentation](../index.html) for more details.
259259
#[cfg(any(target_arch = "nvptx64", doc))]
260260
#[doc(cfg(target_arch = "nvptx64"))]
261-
#[unstable(feature = "stdsimd", issue = "27731")]
261+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
262262
pub mod nvptx {
263263
pub use crate::core_arch::nvptx::*;
264264
}

crates/core_arch/src/nvptx/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,84 +45,98 @@ extern "C" {
4545

4646
/// Synchronizes all threads in the block.
4747
#[inline]
48+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
4849
pub unsafe fn _syncthreads() -> () {
4950
syncthreads()
5051
}
5152

5253
/// x-th thread-block dimension.
5354
#[inline]
55+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
5456
pub unsafe fn _block_dim_x() -> i32 {
5557
block_dim_x()
5658
}
5759

5860
/// y-th thread-block dimension.
5961
#[inline]
62+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
6063
pub unsafe fn _block_dim_y() -> i32 {
6164
block_dim_y()
6265
}
6366

6467
/// z-th thread-block dimension.
6568
#[inline]
69+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
6670
pub unsafe fn _block_dim_z() -> i32 {
6771
block_dim_z()
6872
}
6973

7074
/// x-th thread-block index.
7175
#[inline]
76+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
7277
pub unsafe fn _block_idx_x() -> i32 {
7378
block_idx_x()
7479
}
7580

7681
/// y-th thread-block index.
7782
#[inline]
83+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
7884
pub unsafe fn _block_idx_y() -> i32 {
7985
block_idx_y()
8086
}
8187

8288
/// z-th thread-block index.
8389
#[inline]
90+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
8491
pub unsafe fn _block_idx_z() -> i32 {
8592
block_idx_z()
8693
}
8794

8895
/// x-th block-grid dimension.
8996
#[inline]
97+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
9098
pub unsafe fn _grid_dim_x() -> i32 {
9199
grid_dim_x()
92100
}
93101

94102
/// y-th block-grid dimension.
95103
#[inline]
104+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
96105
pub unsafe fn _grid_dim_y() -> i32 {
97106
grid_dim_y()
98107
}
99108

100109
/// z-th block-grid dimension.
101110
#[inline]
111+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
102112
pub unsafe fn _grid_dim_z() -> i32 {
103113
grid_dim_z()
104114
}
105115

106116
/// x-th thread index.
107117
#[inline]
118+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
108119
pub unsafe fn _thread_idx_x() -> i32 {
109120
thread_idx_x()
110121
}
111122

112123
/// y-th thread index.
113124
#[inline]
125+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
114126
pub unsafe fn _thread_idx_y() -> i32 {
115127
thread_idx_y()
116128
}
117129

118130
/// z-th thread index.
119131
#[inline]
132+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
120133
pub unsafe fn _thread_idx_z() -> i32 {
121134
thread_idx_z()
122135
}
123136

124137
/// Generates the trap instruction `TRAP`
125138
#[inline]
139+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
126140
pub unsafe fn trap() -> ! {
127141
crate::intrinsics::abort()
128142
}
@@ -149,6 +163,7 @@ extern "C" {
149163
/// Sources:
150164
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output),
151165
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
166+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
152167
pub fn vprintf(format: *const u8, valist: *const c_void) -> i32;
153168

154169
/// Allocate memory dynamically from a fixed-size heap in global memory.
@@ -168,6 +183,7 @@ extern "C" {
168183
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations),
169184
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
170185
// FIXME(denzp): assign `malloc` and `nothrow` attributes.
186+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
171187
pub fn malloc(size: usize) -> *mut c_void;
172188

173189
/// Free previously dynamically allocated memory.
@@ -184,6 +200,7 @@ extern "C" {
184200
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations),
185201
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
186202
// FIXME(denzp): assign `nothrow` attribute.
203+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
187204
pub fn free(ptr: *mut c_void);
188205

189206
// Internal declaration of the syscall. Exported variant has
@@ -208,6 +225,7 @@ extern "C" {
208225
/// Source:
209226
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
210227
#[inline]
228+
#[unstable(feature = "stdarch_nvptx", issue = "111199")]
211229
pub unsafe fn __assert_fail(message: *const u8, file: *const u8, line: u32, function: *const u8) {
212230
__assertfail(message, file, line, function, 1)
213231
}

0 commit comments

Comments
 (0)