Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common/cuda/kernel_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ using cuda_bfloat162 = maca_bfloat162;
#include <musa_bf16.h>
#include <musa_fp16.h>
#include <musa_runtime.h>
#include "moore/polyfills.cuh"
using cuda_bfloat16 = __mt_bfloat16;
using cuda_bfloat162 = __mt_bfloat162;
#endif
Expand Down
8 changes: 0 additions & 8 deletions src/moore/add/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@

#include <utility>

// clang-format off
#include <musa_runtime.h>
// clang-format on

// clang-format off
#include "moore/polyfills.cuh"
// clang-format on

#include "cuda/add/kernel.h"

namespace infini::ops {
Expand Down
8 changes: 2 additions & 6 deletions src/moore/polyfills.cuh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#ifndef INFINI_OPS_MOORE_POLYFILLS_CUH_
#define INFINI_OPS_MOORE_POLYFILLS_CUH_

#include <type_traits>

// clang-format off
#include <musa_bf16.h>
// clang-format on

namespace infini::ops {

template <typename T>
Expand Down Expand Up @@ -36,6 +30,8 @@ __device__ __forceinline__ T hrcp(const T& a) {

} // namespace infini::ops

// Force unqualified `hrcp` calls to resolve to our polyfill, bypassing ADL
// which would otherwise pick the MUSA SDK's declared-but-undefined hrcp(__half).
#define hrcp infini::ops::hrcp

#endif
8 changes: 0 additions & 8 deletions src/moore/swiglu/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@

#include <utility>

// clang-format off
#include <musa_runtime.h>
// clang-format on

// clang-format off
#include "moore/polyfills.cuh"
// clang-format on

#include "cuda/swiglu/kernel.h"

namespace infini::ops {
Expand Down