Skip to content

Commit

Permalink
Avoid null pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Oct 16, 2024
1 parent bd75c36 commit 0b43d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/targets/gpu/fuse_mlir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bool mlir_attention_enabled(context* ctx)
if(not mlir_enabled())
return false;
// Enable attention by default for mi300
if(starts_with(ctx->get_current_device().get_gfx_name(), "gfx94"))
if(ctx and starts_with(ctx->get_current_device().get_gfx_name(), "gfx94"))
return true;
return specific_op<requested>("attention");
#else
Expand Down

0 comments on commit 0b43d15

Please sign in to comment.