From 2b0c46ed782561a6c5ad92c6f84bbaaeeab91b05 Mon Sep 17 00:00:00 2001 From: Guangyun Han Date: Thu, 20 Jun 2024 07:26:00 +0000 Subject: [PATCH] fix: build without ck tile --- onnxruntime/contrib_ops/rocm/bert/group_query_attention.cu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onnxruntime/contrib_ops/rocm/bert/group_query_attention.cu b/onnxruntime/contrib_ops/rocm/bert/group_query_attention.cu index 7730b0205b69c..9aadb5c5caf88 100644 --- a/onnxruntime/contrib_ops/rocm/bert/group_query_attention.cu +++ b/onnxruntime/contrib_ops/rocm/bert/group_query_attention.cu @@ -148,6 +148,7 @@ std::once_flag GroupQueryAttention::arch_checking_{}; template Status GroupQueryAttention::ComputeInternal(OpKernelContext* ctx) const { +#if USE_COMPOSABLE_KERNEL_CK_TILE auto hip_stream = static_cast(ctx->GetComputeStream()->GetHandle()); const Tensor* query = ctx->Input(0); const Tensor* key = ctx->Input(1); @@ -512,6 +513,9 @@ Status GroupQueryAttention::ComputeInternal(OpKernelContext* ctx) const { HIP_RETURN_IF_ERROR(hipGetLastError()); return Status::OK(); +#else + return ORT_MAKE_STATUS(ONNXRUNTIME, EP_FAIL, "GroupQueryAttention requires ck_tiles to be enabled"); +#endif } } // namespace rocm