refactor: 统一硬件相关头文件引用

将分散在各文件中的CUDA/HIP/MUSA硬件相关头文件引用统一到vendors目录下的对应头文件中,提高代码可维护性。移除重复的头文件引用,优化构建配置。
This commit is contained in:
2026-01-20 10:14:31 +08:00
parent 5aef6c175a
commit 2bd9bd4cc2
98 changed files with 1757 additions and 1286 deletions

View File

@@ -2,9 +2,9 @@
// clang-format will break include orders
// clang-format off
#include <torch/all.h>
#include "../../../../vendors/functions.h"
#include <ATen/cuda/CUDAContext.h>
#include "cutlass/cutlass.h"

View File

@@ -1,4 +1,4 @@
#include <torch/all.h>
#include "../../../../vendors/functions.h"
#include "cuda_utils.h"
#include "cutlass_extensions/common.hpp"

View File

@@ -1,6 +1,6 @@
#pragma once
#include <torch/all.h>
#include "../../../../vendors/functions.h"
namespace vllm {

View File

@@ -1,11 +1,10 @@
#include "core/registration.h"
#include <torch/all.h>
#include <cutlass/arch/arch.h>
// #include <cutlass/arch/arch.h>
#include "../../../../vendors/functions.h"
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <c10/cuda/CUDAStream.h>
#include "cute/tensor.hpp"
#include "cutlass/tensor_ref.h"

View File

@@ -1,8 +1,6 @@
#pragma once
#include <cuda.h>
#include <torch/all.h>
#include <c10/cuda/CUDAStream.h>
#include "../../../../vendors/functions.h"
#include "core/scalar_type.hpp"
#include "cutlass/bfloat16.h"

View File

@@ -1,5 +1,7 @@
#pragma once
#include "../../../../vendors/functions.h"
#include "cutlass/cutlass.h"
#include "cutlass/gemm/collective/collective_builder.hpp"

View File

@@ -1,7 +1,5 @@
#include <cudaTypedefs.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/all.h>
#include "../../../../vendors/functions.h"
#include "cutlass/cutlass.h"
#include "grouped_mm_c3x.cuh"

View File

@@ -1,7 +1,5 @@
#include <cudaTypedefs.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/all.h>
#include "../../../../vendors/functions.h"
#include "cutlass/cutlass.h"
#include "grouped_mm_c3x.cuh"

View File

@@ -1,7 +1,4 @@
#include <cudaTypedefs.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/all.h>
#include "../../../../vendors/functions.h"
#include <iostream>

View File

@@ -2,7 +2,7 @@
#include <stddef.h>
#include <torch/all.h>
#include <ATen/cuda/CUDAContext.h>
#include "../../../../vendors/functions.h"
// clang-format will break include orders
// clang-format off

View File

@@ -1,7 +1,7 @@
#include <cudaTypedefs.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/all.h>
#include "../../../vendors/functions.h"
#include "cutlass_extensions/common.hpp"

View File

@@ -2,8 +2,9 @@
#include "dispatch_utils.h"
#include "cub_helpers.h"
#include "quantization/vectorization_utils.cuh"
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/Exceptions.h>
#include "../../../../vendors/functions.h"
namespace vllm {

View File

@@ -1,5 +1,4 @@
#include <ATen/cuda/CUDAContext.h>
#include "../../../vendors/functions.h"
#include "quantization/w8a8/per_token_group_quant_8bit.h"
#include <cmath>

View File

@@ -1,6 +1,4 @@
#include <ATen/cuda/CUDAContext.h>
#include <torch/all.h>
#include "../../../vendors/functions.h"
#include "quantization/w8a8/per_token_group_quant_8bit.h"
void per_token_group_quant_int8(const torch::Tensor& input,

View File

@@ -1,6 +1,6 @@
#include <ATen/cuda/CUDAContext.h>
#include <torch/all.h>
#include <c10/cuda/CUDAGuard.h>
#include "../../../vendors/functions.h"
#include <cmath>

View File

@@ -1,6 +1,5 @@
#pragma once
#include <torch/all.h>
#include "../../vendors/functions.h"
// 8-bit per-token-group quantization helper used by both FP8 and INT8
void per_token_group_quant_8bit(const torch::Tensor& input,
torch::Tensor& output_q,