Skip to content

Commit cd0cd85

Browse files
authored
[MISC] More AMD unused var clean up (#14926)
Signed-off-by: Lu Fang <[email protected]>
1 parent 0a74bfc commit cd0cd85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csrc/rocm/attention.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ __device__ __forceinline__ T from_float(const float& inp) {
127127

128128
template <typename T>
129129
__device__ __forceinline__ _B16x4 from_floatx4(const floatx4& inp) {
130-
union tmpcvt {
130+
[[maybe_unused]] union tmpcvt {
131131
uint16_t u;
132132
_Float16 f;
133133
__hip_bfloat16 b;
@@ -160,7 +160,7 @@ __device__ __forceinline__ _B16x4 from_floatx4(const floatx4& inp) {
160160
template <typename T>
161161
__device__ __forceinline__ _B16x4 addx4(const _B16x4& inp1,
162162
const _B16x4& inp2) {
163-
union tmpcvt {
163+
[[maybe_unused]] union tmpcvt {
164164
uint16_t u;
165165
_Float16 f;
166166
__hip_bfloat16 b;
@@ -1273,9 +1273,9 @@ __launch_bounds__(NUM_THREADS) void paged_attention_ll4mi_reduce_kernel(
12731273
const int seq_idx = blockIdx.y;
12741274
const int context_len = context_lens[seq_idx];
12751275
const int num_partitions = DIVIDE_ROUND_UP(context_len, PARTITION_SIZE);
1276-
constexpr int NUM_WARPS = NUM_THREADS / WARP_SIZE;
1276+
[[maybe_unused]] constexpr int NUM_WARPS = NUM_THREADS / WARP_SIZE;
12771277
const int warpid = threadIdx.x / WARP_SIZE;
1278-
const int laneid = threadIdx.x % WARP_SIZE;
1278+
[[maybe_unused]] const int laneid = threadIdx.x % WARP_SIZE;
12791279

12801280
__shared__ float shared_global_exp_sum;
12811281
// max num partitions supported is warp_size * NPAR_LOOPS

0 commit comments

Comments
 (0)