Skip to content

Commit

Permalink
Fix compile error when using rocm (vllm-project#2648)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyang-star authored Feb 1, 2024
1 parent cfb1afb commit 5c8c565
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions csrc/attention/attention_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

#include "attention_dtypes.h"
#include "attention_utils.cuh"
#ifdef ENABLE_FP8_E5M2
#include "../quantization/fp8_e5m2_kvcache/quant_utils.cuh"
#endif

#include <algorithm>

Expand Down
7 changes: 7 additions & 0 deletions csrc/cache_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@

#include "cuda_compat.h"
#include "dispatch_utils.h"
#ifdef ENABLE_FP8_E5M2
#include "quantization/fp8_e5m2_kvcache/quant_utils.cuh"
#endif

#include <algorithm>
#include <cassert>
#include <map>
#include <vector>

#ifdef USE_ROCM
#include <hip/hip_bf16.h>
typedef __hip_bfloat16 __nv_bfloat16;
#endif

void swap_blocks(
torch::Tensor& src,
torch::Tensor& dst,
Expand Down
1 change: 0 additions & 1 deletion csrc/quantization/fp8_e5m2_kvcache/quant_utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "../../attention/dtype_float16.cuh"
#include "../../attention/dtype_bfloat16.cuh"

#pragma once

namespace vllm {
#ifdef ENABLE_FP8_E5M2
Expand Down

0 comments on commit 5c8c565

Please sign in to comment.