Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/targets/gpu/prefuse_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ struct find_channelwise_convolution
auto weights = ins->inputs().back();
auto num_spatial = ins->get_shape().ndim() - 2;

if(input->get_shape().type() != shape::float_type)
if(input->get_shape().type() != shape::float_type and
input->get_shape().type() != shape::half_type)
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition calls input->get_shape().type() twice and hard-codes two comparisons. For readability and to avoid repeating work, consider caching the type in a local (e.g., auto t = …) and checking membership (e.g., via contains({shape::float_type, shape::half_type}, t)) as done in other GPU type gates (e.g., src/targets/gpu/lowering.cpp:349).

Copilot uses AI. Check for mistakes.
return;

auto v = ins->get_operator().to_value();
Expand Down
Loading