Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Moore <[email protected]>
  • Loading branch information
SageMoore committed Dec 19, 2024
1 parent f37c421 commit 21c0f3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions csrc/core/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
inline uint32_t next_pow_2(uint32_t const num) {
if (num <= 1) return num;
return 1 << (CHAR_BIT * sizeof(num) - __builtin_clz(num - 1));
}

template <typename A, typename B>
static inline constexpr auto div_ceil(A a, B b) {
Expand Down
7 changes: 3 additions & 4 deletions csrc/quantization/activation_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ __global__ void act_and_mul_quant_kernel(
scale.data_ptr<float>(), d); \
});

void silu_and_mul_quant(torch::Tensor& out, // [..., d]
torch::Tensor& input, // [..., 2 * d]
torch::Tensor& scale)
{
void silu_and_mul_quant(torch::Tensor& out, // [..., d]
torch::Tensor& input, // [..., 2 * d]
torch::Tensor& scale) {
TORCH_CHECK(out.dtype() == torch::kFloat8_e4m3fn);
TORCH_CHECK(input.dtype() == torch::kFloat16 ||
input.dtype() == torch::kBFloat16);
Expand Down

0 comments on commit 21c0f3d

Please sign in to comment.