Skip to content

Commit 76d4dce

Browse files
vinx13yongwww
authored andcommitted
[Codegen][CUDA] Add error message for missing fragment info (apache#14073)
1 parent 9fc3e7b commit 76d4dce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/target/source/codegen_cuda.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,8 @@ void CodeGenCUDA::PrintWmmaScope(const std::string& scope, DataType t, const Var
12721272
std::ostream& os) {
12731273
std::stringstream type;
12741274
PrintType(t, type);
1275+
ICHECK(fragment_shapes.count(variable))
1276+
<< "Cannot find shape of the wmma fragment " << variable->name_hint;
12751277
std::string shape_str = fragment_shapes.at(variable);
12761278
if ((t.is_int() || t.is_uint()) && t.bits() < 8 && t.lanes() == 1) {
12771279
type.str(std::string());
@@ -1321,6 +1323,8 @@ int stoi(const std::string& str) {
13211323

13221324
int32_t CodeGenCUDA::GetWmmaFragmentSize(const std::string& scope, const VarNode* variable,
13231325
int32_t size) {
1326+
ICHECK(fragment_shapes.count(variable))
1327+
<< "Cannot find shape of the wmma fragment " << variable->name_hint;
13241328
std::string shape_str = fragment_shapes.at(variable);
13251329
size_t m, n, k;
13261330
size_t last_pos = 0, pos = 0;

0 commit comments

Comments
 (0)