Skip to content

Commit

Permalink
Switch to atomic_add.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Jan 15, 2025
1 parent ec5a5c4 commit 1736f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modcc/printer/gpuprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ void emit_state_update_cu(std::ostream& out,
// can do a lot of specialised stuff here.
out << name << " -= " << var << ";\n";
if (flags.is_point) {
out << fmt::format("::arb::gpu::reduce_by_key({}*{}, {}, {}, lane_mask_);\n", weight, name, data, index);
out << fmt::format("::arb::gpu::gpu_atomic_add({}*{}, {} + {});\n", weight, name, data, index);
}
else {
out << var << " = fma(" << weight << ", " << name << ", " << var << ");\n";
Expand Down

0 comments on commit 1736f15

Please sign in to comment.