fix: activation.cu torch/extension.h + LOG(FATAL)→TORCH_CHECK, reshape_paged_cache.cu torch header
xllm_norm.so: ✓ COMPILED AND LOADED (rms_norm, fused_add_rms_norm) activation.cu fixes: - Add #include <torch/extension.h> (torch::Tensor not visible from torch/cuda.h alone) - Replace LOG(FATAL) with TORCH_CHECK (no glog) reshape_paged_cache.cu: - Add #include <torch/extension.h>
This commit is contained in:
@@ -14,6 +14,7 @@ limitations under the License.
|
||||
==============================================================================*/
|
||||
#include <c10/cuda/CUDAGuard.h>
|
||||
#include <torch/cuda.h>
|
||||
#include <torch/extension.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,6 +14,7 @@ limitations under the License.
|
||||
==============================================================================*/
|
||||
|
||||
#include <c10/cuda/CUDAStream.h>
|
||||
#include <torch/extension.h>
|
||||
|
||||
|
||||
#include "device_utils.cuh"
|
||||
|
||||
Reference in New Issue
Block a user