Skip to content

Allowing multiple tags for inames

tj-sun requested to merge multiple-tag into master

Key changes:

  • kernel.iname_to_tags is a defaultdict: iname -> set(tag)
  • tag is hashable now, with class name as key
  • get_iname_tags() to test and retrieve tags of a particular type
  • public APIs for tag_inames() unchanged
  • untagging needs to be done explicitly with untag_inames()
  • minor change in print(kernel) output, not showing None any more for tags
  • check for conflicting tags (there is only group tags vs local tags currently, maybe we need more?)

Not sure:

  • maybe we can reorganize the tags to make use of multiple tags?

I'm not convinced that the semantics are clear, but for illustration purposes, say we have basic tags like these:

  • implicit (do not generate explicit loop)
  • group
  • local
  • ilp
  • unroll
  • sequential/parallel
  • vector

so we have:

  • ilp.unr -> {ilp, unr}
  • ilp.seq -> {ilp, forceseq}
  • g., l.0 -> {implicit, g.}, {implicit, l.*}
  • vectorize innermost loop for openmp (see !250) -> {ilp, local}
  • parallelize over threads for openmp (see !250) -> {g.0}
Edited by tj-sun

Merge request reports