Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Roadmap] Meta Schedule Rules #491

Open
20 tasks done
junrushao opened this issue Oct 23, 2021 · 0 comments
Open
20 tasks done

[Roadmap] Meta Schedule Rules #491

junrushao opened this issue Oct 23, 2021 · 0 comments
Labels

Comments

@junrushao
Copy link
Member

junrushao commented Oct 23, 2021

Schedule Rule

Auto Tensor Core Rule

Postproc Rule

Mutator Rule

Appendix

Legacy CPU

SearchRule

ms.rule.inline_pure_spatial(strict_mode=True)
ms.rule.add_rfactor(
  max_jobs_per_core=16,
  max_innermost_factor=64,
)
ms.rule.multi_level_tiling(
  structure="SSRSRS",
  must_cache_read=False,
  cache_read_scope="global",
  can_cache_write=True,
  must_cache_write=False,
  cache_write_scope="global",
  consumer_inline_strict=True,
  fusion_levels=[1, 2],
)
ms.rule.parallelize_vectorize_unroll(
  max_jobs_per_core=16,
  max_vectorize_extent=32,
  unroll_max_steps=[0, 16, 64, 512],
  unroll_explicit=True,
)
ms.rule.random_compute_location()

Postproc

ms.postproc.rewrite_parallel_vectorize_unroll()
ms.postproc.rewrite_reduction_block()
ms.postproc.disallow_dynamic_loops()

Mutator

ms.mutator.mutate_tile_size(): 0.90
ms.mutator.mutate_compute_location(): 0.05
ms.mutator.mutate_auto_unroll(): 0.03
ms.mutator.mutate_parallel(max_jobs_per_core=16): 0.02

Legacy CUDA

SearchRule

ms.rule.multi_level_tiling(
  structure="SSSRRSRS",
  must_cache_read=True,
  cache_read_scope="shared",
  can_cache_write=True,
  must_cache_write=True,
  cache_write_scope="local",
  consumer_inline_strict=False,
  fusion_levels=[3],
  vector_load_max_len=4,
  tile_binds=["blockIdx.x", "vthread", "threadIdx.x"],
)
ms.rule.inline_pure_spatial(strict_mode=False)
ms.rule.parallelize_vectorize_unroll(
  max_jobs_per_core=-1,  # disable parallelize
  max_vectorize_extent=-1,  # disable vectorize
  unroll_max_steps=[0, 16, 64, 512, 1024],
  unroll_explicit=True,
)

Postproc

ms.postproc.rewrite_cooperative_fetch()
ms.postproc.rewrite_unbound_blocks()
ms.postproc.rewrite_parallel_vectorize_unroll()
ms.postproc.rewrite_reduction_block()
ms.postproc.disallow_dynamic_loops()
ms.postproc.verify_gpu_code()

Mutator

ms.mutator.mutate_tile_size(): 0.90
ms.mutator.mutate_auto_unroll(): 0.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant