Skip to content
Open
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
8 changes: 5 additions & 3 deletions csrc/selective_scan/reverse_scan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ struct WarpReverseScan {

/// Whether the logical warp size and the PTX warp size coincide

// In hipcub, warp_threads is defined as HIPCUB_WARP_THREADS ::rocprim::warp_size()
// While in cub, it's defined as a macro that takes a redundant unused argument.
#ifndef USE_ROCM
#define WARP_THREADS CUB_WARP_THREADS(0)
#else
#define WARP_THREADS HIPCUB_WARP_THREADS
#if ROCM_MAJOR_VERSION >= 7
#define WARP_THREADS rocprim::arch::wavefront::max_size()
#else
#define WARP_THREADS HIPCUB_WARP_THREADS
#endif
#endif
static constexpr bool IS_ARCH_WARP = (LOGICAL_WARP_THREADS == WARP_THREADS);
/// The number of warp scan steps
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def append_nvcc_threads(nvcc_extra_args):
"Refer to the README.md for detailed instructions.",
UserWarning
)
cc_flag.append(f"-DROCM_MAJOR_VERSION={hip_version.major}")

cc_flag.append("-DBUILD_PYTHON_PACKAGE")

Expand Down