CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
2.6 KiB
ReStructuredText
81 lines
2.6 KiB
ReStructuredText
|
|
shfl.sync
|
|
^^^^^^^^^
|
|
|
|
.. code:: cuda
|
|
|
|
// PTX ISA 6.0
|
|
// shfl.sync.mode.b32 d[|p], a, b, c, membermask;
|
|
// .mode = { .up, .down, .bfly, .idx };
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_idx(T data,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_idx(T data,
|
|
bool& pred,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_up(T data,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_up(T data,
|
|
bool& pred,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_down(T data,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_down(T data,
|
|
bool& pred,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_bfly(T data,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
template<typename T>
|
|
[[nodiscard]] __device__ static inline
|
|
T shfl_sync_bfly(T data,
|
|
bool& pred,
|
|
uint32_t lane_idx_offset,
|
|
uint32_t clamp_segmask,
|
|
uint32_t lane_mask) noexcept;
|
|
|
|
**Constrains and checks**
|
|
|
|
The following conditions are checked at *run-time* in debug mode:
|
|
|
|
- ``T`` must have 32-bit size (compile-time)
|
|
- ``lane_idx_offset`` must be less than the warp size
|
|
- ``clamp_segmask`` must use the bit positions [0:4] and [8:12])
|
|
- ``lane_mask`` must be a subset of the active mask
|
|
- All lanes must have the same value for ``lane_mask``
|
|
- The destination lane must be a member of the ``lane_mask``
|