Commit 2f9b307c authored by sxtyzhangzk's avatar sxtyzhangzk Committed by Zhekai Zhang
Browse files

[major] workaround layout issue on gcc :(

parent e3e2a92a
...@@ -605,7 +605,8 @@ public: ...@@ -605,7 +605,8 @@ public:
struct EpilogueDefault { struct EpilogueDefault {
struct Arguments {}; // workaround for layout mismatch between host and device code
struct Arguments { size_t unused; };
__device__ __forceinline__ __device__ __forceinline__
void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) { void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) {
...@@ -617,7 +618,7 @@ public: ...@@ -617,7 +618,7 @@ public:
}; };
struct EpilogueNop { struct EpilogueNop {
struct Arguments {}; struct Arguments { size_t unused; };
__device__ __forceinline__ __device__ __forceinline__
void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) { void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) {
...@@ -1664,7 +1665,7 @@ public: ...@@ -1664,7 +1665,7 @@ public:
}; };
struct EpilogueGelu { struct EpilogueGelu {
struct Arguments {}; struct Arguments { size_t unused; };
// static constexpr float SHIFT_VALUE = 0.171875f; // static constexpr float SHIFT_VALUE = 0.171875f;
...@@ -2417,7 +2418,7 @@ public: ...@@ -2417,7 +2418,7 @@ public:
struct EpilogueGLU { struct EpilogueGLU {
struct Arguments {}; struct Arguments { size_t unused; };
__device__ __forceinline__ __device__ __forceinline__
void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) { void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) {
...@@ -2431,7 +2432,7 @@ public: ...@@ -2431,7 +2432,7 @@ public:
}; };
struct EpilogueSilu { struct EpilogueSilu {
struct Arguments {}; struct Arguments { size_t unused; };
__device__ __forceinline__ __device__ __forceinline__
void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) { void operator()(const BlockInfo binfo, fpsum_warp fpsum, half_t *out, int M, int N, int K, Arguments args) {
...@@ -2723,7 +2724,7 @@ void gemm_w4a4( ...@@ -2723,7 +2724,7 @@ void gemm_w4a4(
} }
dispatchBool(act_unsigned, [&]<bool ACT_UNSIGNED>() { dispatchBool(act_unsigned, [&]<bool ACT_UNSIGNED>() {
// test_sizeof<Epilogue::Arguments>(); // test_sizeof<typename Epilogue::Arguments>();
// std::apply([](auto ...args) { // std::apply([](auto ...args) {
// (test_sizeof<decltype(args)>(), ...); // (test_sizeof<decltype(args)>(), ...);
// }, args); // }, args);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment