[all-commits] [llvm/llvm-project] 8ff427: [mlir] Use thread-pool's notion of thread count in...

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Thu Dec 23 17:05:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ff42766d1effcee2e4ebb0016b02430263cb4f0
      https://github.com/llvm/llvm-project/commit/8ff42766d1effcee2e4ebb0016b02430263cb4f0
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2021-12-23 (Thu, 23 Dec 2021)

  Changed paths:
    M mlir/lib/Transforms/Inliner.cpp

  Log Message:
  -----------
  [mlir] Use thread-pool's notion of thread count instead of requerying system.

The computed number of hardware threads can change over the life of the process based on affinity changes. Since we need a data structure that is at least as large as the maximum parallelism, it is important to use the value that was actually latched for the thread pool we will be dispatching work to.

Also adds an assert specifically for if it doesn't line up (I was getting a crash on an index into the vector).

Differential Revision: https://reviews.llvm.org/D116257




More information about the All-commits mailing list