-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCLomatic]Enable migration CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT #2421
base: SYCLomatic
Are you sure you want to change the base?
Conversation
// CHECK-NEXT: matLayout = new dpct::blas_gemm::experimental::matrix_layout_t(type, rows, cols, ld); | ||
cublasLtMatrixLayout_t matLayout; | ||
cudaDataType type; | ||
uint64_t rows; | ||
uint64_t cols; | ||
int64_t ld; | ||
cublasLtMatrixLayoutCreate(&matLayout, type, rows, cols, ld); | ||
uint64_t batch_count; | ||
cublasLtMatrixLayoutCreate(&matLayout, type, rows, cols, ld, batch_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cublasLtMatrixLayoutCreate(&matLayout, type, rows, cols, ld, batch_count); | |
cublasLtMatrixLayoutCreate(&matLayout, type, rows, cols, ld); |
cublasLtMatrixLayoutCreate
does not accept batch_count as a parameter. https://docs.nvidia.com/cuda/cublas/#cublasltmatrixlayoutcreate
@@ -1916,6 +1916,9 @@ void MapNames::setExplicitNamespaceMap( | |||
{"CUBLASLT_MATRIX_LAYOUT_TYPE", | |||
getLibraryHelperNamespace() + | |||
"blas_gemm::experimental::matrix_layout_t::attribute::type"}, | |||
{"CUBLASLT_MATRIX_LAYOUT_BATCH_COUT", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{"CUBLASLT_MATRIX_LAYOUT_BATCH_COUT", | |
{"CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT", |
@@ -62,11 +62,11 @@ class descriptor { | |||
|
|||
class matrix_layout_t { | |||
public: | |||
enum class attribute { type, order, rows, cols, ld }; | |||
enum class attribute { type, order, rows, cols, ld, batch_count}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum class attribute { type, order, rows, cols, ld, batch_count}; | |
enum class attribute { type, order, rows, cols, ld, batch_count }; |
std::int64_t ld, std::uint64_t batch_count=1) | ||
: _type(type), _rows(rows), _cols(cols), _ld(ld), _batch_count(batch_count) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to keep the constructor since its parameters can 1:1 mapping to cublasLtMatrixLayoutCreate
. We can use set/get_attribute() to access the value.
And please add a private std::uint64_t _batch_count;
member in this class.
std::int64_t ld, std::uint64_t batch_count=1) | |
: _type(type), _rows(rows), _cols(cols), _ld(ld), _batch_count(batch_count) {} | |
std::int64_t ld) | |
: _type(type), _rows(rows), _cols(cols), _ld(ld)) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR.
@zhiweij1 @zhimingwang36