Commit 82e8ca03 authored by zhangshao's avatar zhangshao
Browse files

优化pa_opt的编译速度

parent e02d110d
......@@ -861,7 +861,7 @@ void paged_attention_v1_launcher(
dim3 block(NUM_THREADS);
const at::hip::OptionalHIPGuardMasqueradingAsCUDA device_guard(device_of(query));
const hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE);
if constexpr(BLOCK_SIZE==16 && IS_BLOCK_SPARSE==false && sizeof(T)==2){LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE);}
});
});
});
......@@ -1006,7 +1006,7 @@ void paged_attention_v2_launcher(
dim3 block(NUM_THREADS);
const at::hip::OptionalHIPGuardMasqueradingAsCUDA device_guard(device_of(query));
const hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
LAUNCH_PAGED_ATTENTION_V2(HEAD_SIZE);
if constexpr(BLOCK_SIZE==16 && IS_BLOCK_SPARSE==false && sizeof(T)==2){LAUNCH_PAGED_ATTENTION_V2(HEAD_SIZE);}
});
});
});
......
......@@ -883,7 +883,7 @@ void paged_attention_v1_launcher(
dim3 block(NUM_THREADS);
const at::hip::OptionalHIPGuardMasqueradingAsCUDA device_guard(device_of(query));
const hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE);
if constexpr(BLOCK_SIZE==16 && IS_BLOCK_SPARSE==false && sizeof(T)==2){LAUNCH_PAGED_ATTENTION_V1(HEAD_SIZE);}
});
});
});
......@@ -1041,7 +1041,7 @@ void paged_attention_v2_launcher(
dim3 block(NUM_THREADS);
const at::hip::OptionalHIPGuardMasqueradingAsCUDA device_guard(device_of(query));
const hipStream_t stream = at::hip::getCurrentHIPStreamMasqueradingAsCUDA();
LAUNCH_PAGED_ATTENTION_V2(HEAD_SIZE);
if constexpr(BLOCK_SIZE==16 && IS_BLOCK_SPARSE==false && sizeof(T)==2){LAUNCH_PAGED_ATTENTION_V2(HEAD_SIZE);}
});
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment