"docs/vscode:/vscode.git/clone" did not exist on "0836aec67b5ebdcc1c6c318674f95b5920002d47"
Commit d7fd160a authored by Chao Liu's avatar Chao Liu
Browse files

fix 2gb limit issue

parent 052b23e2
......@@ -864,9 +864,9 @@ struct DeviceConvNDFwdXdl_Input_N_Hi_Wi_C_Weight_K_Y_X_C_Output_N_Ho_Wo_K
// Input tensors can't be bigger than 2GB each.
constexpr ck::long_index_t GB2 = (ck::long_index_t{1} << 31);
if(arg.a_grid_desc_k0_m_k1_.GetElementSpaceSize() > GB2 ||
arg.b_grid_desc_k0_n_k1_.GetElementSpaceSize() > GB2 ||
arg.c_grid_desc_m_n_.GetElementSpaceSize() > GB2)
if(arg.a_grid_desc_k0_m_k1_.GetElementSpaceSize() * sizeof(ADataType) > GB2 ||
arg.b_grid_desc_k0_n_k1_.GetElementSpaceSize() * sizeof(BDataType) > GB2 ||
arg.c_grid_desc_m_n_.GetElementSpaceSize() * sizeof(CDataType) > GB2)
{
return false;
}
......
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