Skip to content

Commit

Permalink
Fix FlashAttension SLM path failure (#2182)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitneywhtsang committed Sep 10, 2024
1 parent 0a4d503 commit fed5856
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,14 @@ struct AllocateSharedMemory
IntegerAttr::get(IntegerType::get(ctx, 32), offset));
});
});
mod->setAttr("triton_gpu.shared",
IntegerAttr::get(IntegerType::get(ctx, 32),
allocation.getSharedMemorySize()));
int32_t originSharedSize = 0;
if (IntegerAttr sharedAttr =
mod->getAttrOfType<IntegerAttr>("triton_gpu.shared"))
originSharedSize = sharedAttr.getInt();
mod->setAttr(
"triton_gpu.shared",
IntegerAttr::get(IntegerType::get(ctx, 32),
originSharedSize + allocation.getSharedMemorySize()));
}
};

Expand Down

0 comments on commit fed5856

Please sign in to comment.