Skip to content

Commit 12a223e

Browse files
authored
[AMD][CI/Build][Bugfix] Guarding CUDA specific functions by ifndef ROCM (#21766)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
1 parent e18f085 commit 12a223e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

csrc/quantization/compressed_tensors/int8_quant_kernels.cu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <ATen/cuda/CUDAContext.h>
22
#include <torch/all.h>
33

4-
#include "../per_token_group_quant_8bit.h"
4+
#ifndef USE_ROCM
5+
#include "../per_token_group_quant_8bit.h"
6+
#endif
57

68
#include <cmath>
79

@@ -339,10 +341,12 @@ void dynamic_scaled_int8_quant(
339341
});
340342
}
341343

344+
#ifndef USE_ROCM
342345
void per_token_group_quant_int8(const torch::Tensor& input,
343346
torch::Tensor& output_q,
344347
torch::Tensor& output_s, int64_t group_size,
345348
double eps, double int8_min, double int8_max) {
346349
per_token_group_quant_8bit(input, output_q, output_s, group_size, eps,
347350
int8_min, int8_max);
348-
}
351+
}
352+
#endif

0 commit comments

Comments
 (0)