From ed25ca9875f5df0c7bea0a281d009bd361538180 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 4 May 2023 12:50:17 +0100 Subject: [PATCH] Add tracking issue for NVPTX intrinsics --- library/stdarch/crates/core_arch/src/mod.rs | 2 +- .../stdarch/crates/core_arch/src/nvptx/mod.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/library/stdarch/crates/core_arch/src/mod.rs b/library/stdarch/crates/core_arch/src/mod.rs index 9963a724ee27..fe2085d05e78 100644 --- a/library/stdarch/crates/core_arch/src/mod.rs +++ b/library/stdarch/crates/core_arch/src/mod.rs @@ -258,7 +258,7 @@ pub mod arch { /// See the [module documentation](../index.html) for more details. #[cfg(any(target_arch = "nvptx64", doc))] #[doc(cfg(target_arch = "nvptx64"))] - #[unstable(feature = "stdsimd", issue = "27731")] + #[unstable(feature = "stdarch_nvptx", issue = "111199")] pub mod nvptx { pub use crate::core_arch::nvptx::*; } diff --git a/library/stdarch/crates/core_arch/src/nvptx/mod.rs b/library/stdarch/crates/core_arch/src/nvptx/mod.rs index bf6673f4788e..3df767cc7f29 100644 --- a/library/stdarch/crates/core_arch/src/nvptx/mod.rs +++ b/library/stdarch/crates/core_arch/src/nvptx/mod.rs @@ -45,84 +45,98 @@ extern "C" { /// Synchronizes all threads in the block. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _syncthreads() -> () { syncthreads() } /// x-th thread-block dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_dim_x() -> i32 { block_dim_x() } /// y-th thread-block dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_dim_y() -> i32 { block_dim_y() } /// z-th thread-block dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_dim_z() -> i32 { block_dim_z() } /// x-th thread-block index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_idx_x() -> i32 { block_idx_x() } /// y-th thread-block index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_idx_y() -> i32 { block_idx_y() } /// z-th thread-block index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _block_idx_z() -> i32 { block_idx_z() } /// x-th block-grid dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _grid_dim_x() -> i32 { grid_dim_x() } /// y-th block-grid dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _grid_dim_y() -> i32 { grid_dim_y() } /// z-th block-grid dimension. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _grid_dim_z() -> i32 { grid_dim_z() } /// x-th thread index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _thread_idx_x() -> i32 { thread_idx_x() } /// y-th thread index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _thread_idx_y() -> i32 { thread_idx_y() } /// z-th thread index. #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn _thread_idx_z() -> i32 { thread_idx_z() } /// Generates the trap instruction `TRAP` #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn trap() -> ! { crate::intrinsics::abort() } @@ -149,6 +163,7 @@ extern "C" { /// Sources: /// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output), /// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls). + #[unstable(feature = "stdarch_nvptx", issue = "111199")] pub fn vprintf(format: *const u8, valist: *const c_void) -> i32; /// Allocate memory dynamically from a fixed-size heap in global memory. @@ -168,6 +183,7 @@ extern "C" { /// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations), /// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls). // FIXME(denzp): assign `malloc` and `nothrow` attributes. + #[unstable(feature = "stdarch_nvptx", issue = "111199")] pub fn malloc(size: usize) -> *mut c_void; /// Free previously dynamically allocated memory. @@ -184,6 +200,7 @@ extern "C" { /// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations), /// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls). // FIXME(denzp): assign `nothrow` attribute. + #[unstable(feature = "stdarch_nvptx", issue = "111199")] pub fn free(ptr: *mut c_void); // Internal declaration of the syscall. Exported variant has @@ -208,6 +225,7 @@ extern "C" { /// Source: /// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls). #[inline] +#[unstable(feature = "stdarch_nvptx", issue = "111199")] pub unsafe fn __assert_fail(message: *const u8, file: *const u8, line: u32, function: *const u8) { __assertfail(message, file, line, function, 1) }