loopy
loopy copied to clipboard
Warnings in operation counting
Hey!
When I count the operations of a kernel with Loo.py, I get a lot of warnings that say something similar to the following.
LoopyWarning: in kernel some_insns_knl: get_insn_count: when counting instruction out with count_granularity=subgroup, using upper bound for work-group size (1 work-items) to compute sub-groups per work-group. When multiple device programs present, actual sub-group count may be lower. (add 'insn_count_subgroups_upper_bound' to silenced_warnings kernel attribute to disable)
warn_with_kernel(knl, "insn_count_subgroups_upper_bound",
As adviced in the error message I am trying to silence the warnings with the following
knl = slate_wrapper_knl.default_entrypoint
warnings = list(knl.silenced_warnings)
warnings.extend(["insn_count_subgroups_upper_bound", "no_lid_found"])
knl = knl.copy(silenced_warnings=warnings)
slate_wrapper_knl = slate_wrapper_knl.with_kernel(knl)
op_map = lp.get_op_map(slate_wrapper_knl, subgroup_size='guess')
But the warnings are not shut up. Am I doing this wrong? An MFE can be found here https://gist.github.com/sv2518/c0639e1b7704ac3bdbc994d632062cea.
Okay I managed to turn the warnings off by adding the silenced warning to all kernels, but I think it would be good for us if we could set this on a program and then this will be automatically set for all kernels inside that program (or something similar but basically we only want to set this once in the PyOP2 wrapper kernel I think).