Skip to content

Commit

Permalink
Support on all AMD GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
rraminen committed May 14, 2024
1 parent 5d0e1c6 commit 88c7be4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions csrc/transformer/inference/csrc/apply_rotary_pos_emb.cu
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,9 @@ __global__ void apply_rotary_pos_half(T* mixed_query,
rope_theta, \
max_out_tokens);

#ifdef __HIP_PLATFORM_AMD__
#if defined(__HIP_PLATFORM_AMD__) and ROCM_WAVEFRONT_SIZE == 64
#define LAUNCH_FOR_ALIGNMENT(ALIGNMENT) \
if (threads_per_head == 4) { \
LAUNCH_ROT_POS_EMB_HALF(4, ALIGNMENT); \
} else if (threads_per_head == 8) { \
LAUNCH_ROT_POS_EMB_HALF(8, ALIGNMENT); \
} else if (threads_per_head == 16) { \
LAUNCH_ROT_POS_EMB_HALF(16, ALIGNMENT); \
} else if (threads_per_head == 32) { \
LAUNCH_ROT_POS_EMB_HALF(32, ALIGNMENT); \
} else if (threads_per_head == 64) { \
if (threads_per_head == 64) { \
LAUNCH_ROT_POS_EMB_HALF(64, ALIGNMENT); \
} else { \
assert(false); \
Expand Down

0 comments on commit 88c7be4

Please sign in to comment.