File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -744,7 +744,9 @@ def to_proxy(arg: TypeInfo) -> object:
744
744
and input_contains_tensor
745
745
and output_type .contains_tensor ()
746
746
):
747
- if not regexp_allowed_host_ops .search (self .name ):
747
+ if getattr (self .value , "__module__" , "" ).startswith (
748
+ "torch"
749
+ ) and not regexp_allowed_host_ops .search (self .name ):
748
750
warning (exc .TensorOperationInWrapper (self .name ))
749
751
return output_type
750
752
except exc .ShapeSpecializingCall :
Original file line number Diff line number Diff line change @@ -285,7 +285,9 @@ def report(self) -> str:
285
285
class TensorOperationInWrapper (BaseWarning ):
286
286
message = (
287
287
"A tensor operation outside of the `hl.tile` or `hl.grid` loop will not be fused "
288
- "in the generated kernel."
288
+ "in the generated kernel.\n "
289
+ "Use @helion.kernel(ignore_warnings=[helion.exc.TensorOperationInWrapper]) to suppress this warning.\n "
290
+ "If this is not a tensor operation, please report this as a bug."
289
291
)
290
292
291
293
You can’t perform that action at this time.
0 commit comments