Skip to content
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

Add a check for unsupported transpose and datatype #1205

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cliffxzx
Copy link
Contributor

@cliffxzx cliffxzx commented Oct 4, 2024

To prevent users from being misled into using the conjugate transpose, this modification removes the description and adds a check for the conjugate transpose.

Original

build_9b8753/release/clients/staging/hipblaslt-bench -m 5 -n 1 -k 1 --a_type f8_r --b_type f8_r --c_type f8_r --d_type f8_r --compute_type f32_r --beta 1 --transA C --transB N --print_kernel_info
hipBLASLt version: 1000
hipBLASLt git version: 9b875390-dirty
Query device success: there are 1 devices
-------------------------------------------------------------------------------
Device ID 0 : AMD Radeon Graphics gfx1201
with 17.1 GB memory, max. SCLK 2426 MHz, max. MCLK 1258 MHz, compute capability 12.0
maxGridDimX 2147483647, sharedMemPerBlock 65.5 KB, maxThreadsPerBlock 1024, warpSize 32
-------------------------------------------------------------------------------

Is supported 1 / Total solutions: 1
[0]:transA,transB,grouped_gemm,batch_count,m,n,k,alpha,lda,stride_a,beta,ldb,stride_b,ldc,stride_c,ldd,stride_d,a_type,b_type,c_type,d_type,compute_type,scaleA,scaleB,scaleC,scaleD,amaxD,activation_type,bias_vector,bias_type,hipblaslt-Gflops,hipblaslt-GB/s,us
    C,N,0,1,5,1,1,1,1,5,1,1,1,5,5,5,5,f8_r,f8_r,f8_r,f8_r,f32_r,0,0,0,0,0,none,0,non-supported type,0.00111111,0.00320789,9
    --Solution index: 754
    --Solution name:  Cijk_Alik_Bljk_F8F8S_BH_BiasSHB_HAS_SAB_SCD_SAV_UserArgs_MT64x16x64_MI16x16x1_SN_LDSB0_AFC1_CLR1_EPS0_GRVWA8_GRVWB8_GSU1_GSUC0_GSUWGMRR0_K1_LBSPPA128_LBSPPB128_LPA8_LPB8_LRVW8_MIAV1_MIWT1_1_ONLL0_PGR1_PLR3_SIA3_SS1_SU32_SUM0_SUS256_SVW1_TLDS1_WS32_WG64_2_1_WGM8_WGMXCC1_WGMXCCG0
    --kernel name:    Cijk_Alik_Bljk_F8F8S_BH_BiasSHB_HAS_SAB_SCD_SAV_UserArgs_MT64x16x64_MI16x16x1_SN_LDSB0_AFC1_CLR1_EPS0_GRVWA8_GRVWB8_K1_LBSPPA128_LBSPPB128_LPA8_LPB8_LRVW8_MIAV1_MIWT1_1_ONLL0_PGR1_PLR3_SIA3_SS1_SVW1_TLDS1_WS32_WG64_2_1

Modified

hipblaslt-bench -m 5 -n 1 -k 1 --a_type f8_r --b_type f8_r --c_type f8_r --d_type f8_r --compute_type f32_r --beta 1 --transA C --transB N --print_kernel_info
# ...
+ [2024-10-04 05:41:15][HIPBLASLT][2566765][Error][rocblaslt_matmul_valid_args] invalid args=op op_A=Invalid op_B=OP_N 
[2024-10-04 05:41:15][HIPBLASLT][2566765][Api][rocblaslt_matmul_algo_get_heuristic] returnAlogCount=0 
# ...
error: NO solution found! at /home/haosheng/projects/hipBLASLt+remove_unsupported_transpose_and_datatype/clients/benchmarks/../include/testing_matmul.hpp:2476

@@ -214,7 +214,7 @@ HIPBLASLT_EXPORT
constexpr hipDataType string_to_hip_datatype_assert(const std::string& value)
{
auto datatype = string_to_hip_datatype(value);
if(static_cast<int>(datatype) == 0)
if(datatype == HIPBLASLT_DATATYPE_INVALID)
Copy link
Contributor Author

@cliffxzx cliffxzx Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding value for static_cast<int>(datatype) == 0 is HIP_R_32F. To verify that it is an invalid datatype, it should be compared with HIPBLASLT_DATATYPE_INVALID.

@cliffxzx cliffxzx force-pushed the remove_unsupported_transpose_and_datatype branch from f6ba1de to bc40887 Compare October 4, 2024 05:49
@cliffxzx cliffxzx changed the title Add a check for unsupported transpose Add a check for unsupported transpose and datatype Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant