Skip to content

Commit

Permalink
[SYCLomatic] Support the migration of enum CUBLASLT_EPILOGUE_BGRADB (#…
Browse files Browse the repository at this point in the history
…2549)

Signed-off-by: Jiang, Zhiwei <[email protected]>
  • Loading branch information
zhiweij1 authored Dec 9, 2024
1 parent 86af5f3 commit f84e179
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions clang/lib/DPCT/RulesMathLib/MapNamesBlas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,9 @@ void MapNamesBlas::setExplicitNamespaceMap(
{"CUBLASLT_EPILOGUE_RELU",
MapNames::getLibraryHelperNamespace() +
"blas_gemm::experimental::epilogue_t::relu"},
{"CUBLASLT_EPILOGUE_BGRADB",
MapNames::getLibraryHelperNamespace() +
"blas_gemm::experimental::epilogue_t::bgradb"},
{"CUBLASLT_EPILOGUE_BIAS",
MapNames::getLibraryHelperNamespace() +
"blas_gemm::experimental::epilogue_t::bias"},
Expand Down
3 changes: 2 additions & 1 deletion clang/runtime/dpct-rt/include/dpct/blas_gemm_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ enum class epilogue_t {
gelu,
gelu_bias,
gelu_aux,
gelu_aux_bias
gelu_aux_bias,
bgradb
};

class descriptor;
Expand Down
2 changes: 2 additions & 0 deletions clang/test/dpct/cublaslt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ void foo3() {
// CHECK-NEXT: e = dpct::blas_gemm::experimental::epilogue_t::gelu_bias;
// CHECK-NEXT: e = dpct::blas_gemm::experimental::epilogue_t::gelu_aux;
// CHECK-NEXT: e = dpct::blas_gemm::experimental::epilogue_t::gelu_aux_bias;
// CHECK-NEXT: e = dpct::blas_gemm::experimental::epilogue_t::bgradb;
cublasLtEpilogue_t e;
e = CUBLASLT_EPILOGUE_DEFAULT;
e = CUBLASLT_EPILOGUE_RELU;
Expand All @@ -247,6 +248,7 @@ void foo3() {
e = CUBLASLT_EPILOGUE_GELU_BIAS;
e = CUBLASLT_EPILOGUE_GELU_AUX;
e = CUBLASLT_EPILOGUE_GELU_AUX_BIAS;
e = CUBLASLT_EPILOGUE_BGRADB;
}

void foo4() {
Expand Down

0 comments on commit f84e179

Please sign in to comment.