Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace diag_suppress by nv_diag_suppress in documentation #281

Merged
merged 1 commit into from
Aug 15, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ warning: dynamic initialization is not supported for a function-scope static
__shared__ variable within a __device__/__global__ function
```

It can be silenced using `#pragma diag_suppress static_var_with_dynamic_init`.
It can be silenced using `#pragma nv_diag_suppress static_var_with_dynamic_init`.

To properly initialize a `__shared__` `cuda::barrier`, use the
[`cuda::barrier::init`] friend function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ warning: dynamic initialization is not supported for a function-scope static
__shared__ variable within a __device__/__global__ function
```

It can be silenced using `#pragma diag_suppress static_var_with_dynamic_init`.
It can be silenced using `#pragma nv_diag_suppress static_var_with_dynamic_init`.

## Example

```cuda
#include <cuda/barrier>

// Disables `pipeline_shared_state` initialization warning.
#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

__global__ void example_kernel() {
__shared__ cuda::barrier<cuda::thread_scope_block> bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ A `cuda::pipeline` object.
#include <cooperative_groups.h>

// Disables `pipeline_shared_state` initialization warning.
#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

__global__ void example_kernel() {
__shared__ cuda::pipeline_shared_state<cuda::thread_scope_block, 2> pss0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ A thread role cannot change during the lifetime of the pipeline object.
#include <cooperative_groups.h>

// Disables `pipeline_shared_state` initialization warning.
#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

template <typename T>
__device__ void compute(T* ptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If the pipeline is in a _quitted state_ (see [`cuda::pipeline::quit`]), the
#include <cuda/pipeline>

// Disables `barrier` initialization warning.
#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

__global__ void
example_kernel(cuda::std::uint64_t* global, cuda::std::size_t element_count) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ warning: dynamic initialization is not supported for a function-scope static
__shared__ variable within a __device__/__global__ function
```

It can be silenced using `#pragma diag_suppress static_var_with_dynamic_init`.
It can be silenced using `#pragma nv_diag_suppress static_var_with_dynamic_init`.

## Example

```cuda
#include <cuda/pipeline>

// Disables `pipeline_shared_state` initialization warning.
#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

__global__ void example_kernel(char* device_buffer, char* sysmem_buffer) {
// Allocate a 2 stage block scoped shared state in shared memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Construct a [`cuda::pipeline`] _shared state_ object.
```cuda
#include <cuda/pipeline>

#pragma diag_suppress static_var_with_dynamic_init
#pragma nv_diag_suppress static_var_with_dynamic_init

__global__ void example_kernel() {
__shared__ cuda::pipeline_shared_state<cuda::thread_scope_block, 2> shared_state;
Expand Down