From a206fc1d434d482f195a90e6d20d6fd18bb9be2c Mon Sep 17 00:00:00 2001 From: claude Date: Fri, 14 Aug 2026 10:52:54 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20activation.cu=20torch/extension.h=20+=20?= =?UTF-8?q?LOG(FATAL)=E2=86=92TORCH=5FCHECK,=20reshape=5Fpaged=5Fcache.cu?= =?UTF-8?q?=20torch=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xllm_norm.so: ✓ COMPILED AND LOADED (rms_norm, fused_add_rms_norm) activation.cu fixes: - Add #include (torch::Tensor not visible from torch/cuda.h alone) - Replace LOG(FATAL) with TORCH_CHECK (no glog) reshape_paged_cache.cu: - Add #include --- ex_engine/xllm_kernels/cuda/activation.cu | 5 +++-- ex_engine/xllm_kernels/cuda/reshape_paged_cache.cu | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ex_engine/xllm_kernels/cuda/activation.cu b/ex_engine/xllm_kernels/cuda/activation.cu index a7cafc63..409ca324 100644 --- a/ex_engine/xllm_kernels/cuda/activation.cu +++ b/ex_engine/xllm_kernels/cuda/activation.cu @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ #include #include +#include #include @@ -166,8 +167,8 @@ void act_and_mul(torch::Tensor out, const std::string& act_mode) { if (act_mode != "silu" && act_mode != "gelu" && act_mode != "gelu_tanh" && act_mode != "gelu_pytorch_tanh") { - LOG(FATAL) << "Unsupported act mode: " << act_mode - << ", only support silu, gelu, gelu_tanh, gelu_pytorch_tanh"; + TORCH_CHECK(false, "Unsupported act mode: ", act_mode, + ", only support silu, gelu, gelu_tanh, gelu_pytorch_tanh"); } // flashinfer act_and_mul ops diff --git a/ex_engine/xllm_kernels/cuda/reshape_paged_cache.cu b/ex_engine/xllm_kernels/cuda/reshape_paged_cache.cu index c835f95c..ab9591aa 100644 --- a/ex_engine/xllm_kernels/cuda/reshape_paged_cache.cu +++ b/ex_engine/xllm_kernels/cuda/reshape_paged_cache.cu @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ #include +#include #include "device_utils.cuh"