sycl: the migrated Gemm::bf16 / gr_norm* definitions take #2091's new parameters (the shared headers changed; SYCL never uses the FP16 image)
The SYCL build of the sm_75 series failed with 'out-of-line definition of bf16 does not match any declaration' (sycl/src/prefill/gemm.dp.cpp); the four gr_* writers would have failed at link. Gemm::bf16_converts_x() answers false.
This commit is contained in:
1 parent
bcef7b7818
commit
2016b7fe01
2 files changed
+9
-5
No files matched your search
@@ -743,8 +743,11 @@ inline bool staged_gemm(sycl::queue& q, void* handle, const uint16_t* W, int lda
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// (#2091, CUDA Turing only) no FP16 activation image on this backend
|
||||
bool Gemm::bf16_converts_x() const { return false; }
|
||||
|
||||
void Gemm::bf16(const uint16_t* X, const uint16_t* W, float* Y, int64_t T, int64_t N, int64_t K, int64_t ldy,
|
||||
float beta, int64_t ldx) {
|
||||
float beta, int64_t ldx, bool /*x_f16*/) {
|
||||
if (T <= 0 || N <= 0) return;
|
||||
if (ldy <= 0) ldy = N;
|
||||
if (ldx <= K) ldx = 0;
|
||||
|
||||
@@ -2278,7 +2278,7 @@ void to_bf16(const float* x, uint16_t* y, int64_t n, void* stream, uint16_t* ylo
|
||||
}
|
||||
|
||||
void gr_norm(const float* R, const float* w_norm, float eps, float* xn, uint16_t* xn16, int64_t T, void* stream,
|
||||
uint16_t* xn16_lo) {
|
||||
uint16_t* xn16_lo, bool /*f16img: the Turing FP16 image of xn16 (CUDA only)*/) {
|
||||
{
|
||||
auto exp_props = sycl::ext::oneapi::experimental::properties{
|
||||
sycl::ext::oneapi::experimental::use_root_sync};
|
||||
@@ -2297,7 +2297,7 @@ void gr_norm(const float* R, const float* w_norm, float eps, float* xn, uint16_t
|
||||
check("gr_norm");
|
||||
}
|
||||
void gr_norm_rs(const float* R, const float* w_norm, float eps, float* rs, uint16_t* xn16, int64_t T, void* stream,
|
||||
uint16_t* xn16_lo, int64_t ldx) {
|
||||
uint16_t* xn16_lo, int64_t ldx, bool /*f16img*/) {
|
||||
{
|
||||
auto exp_props = sycl::ext::oneapi::experimental::properties{
|
||||
sycl::ext::oneapi::experimental::use_root_sync};
|
||||
@@ -2360,7 +2360,8 @@ bool gr_upmix(const uint16_t* lo16, const uint16_t* w_up, const float* R, const
|
||||
#endif
|
||||
}
|
||||
void gr_write_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_ld, const float* w_norm_next, float eps,
|
||||
float* rs, uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx) {
|
||||
float* rs, uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx,
|
||||
bool /*f16img*/) {
|
||||
{
|
||||
auto exp_props = sycl::ext::oneapi::experimental::properties{
|
||||
sycl::ext::oneapi::experimental::use_root_sync};
|
||||
@@ -2387,7 +2388,7 @@ void gr_write_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_l
|
||||
}
|
||||
void gr_write_cvec_norm_rs(float* R, const float* bo, const float* inj, int64_t inj_ld, const float* v_l,
|
||||
const float* s_l, const int* on, int mode, const float* w_norm_next, float eps, float* rs,
|
||||
uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx) {
|
||||
uint16_t* xn16, int64_t T, void* stream, uint16_t* xn16_lo, int64_t ldx, bool /*f16img*/) {
|
||||
{
|
||||
auto exp_props = sycl::ext::oneapi::experimental::properties{
|
||||
sycl::ext::oneapi::experimental::use_root_sync};
|
||||
|
||||
Reference in new issue
Block a user