Fix conversion of loops to GPU with no block/thread dimensions.
authorStephan Herhut <herhut@google.com>
Thu, 30 Jan 2020 10:27:17 +0000 (11:27 +0100)
committerStephan Herhut <herhut@google.com>
Fri, 31 Jan 2020 10:00:28 +0000 (11:00 +0100)
commit84695dd4d788dd65bb2b83ae1512a86c42109d7e
treea7d8ea2c2613dd4e04f50c8c02971543cd339383
parentcf6037b5619037be993ee9d5850737f25cdd82c1
Fix conversion of loops to GPU with no block/thread dimensions.

Summary:
The current code assumes that one always maps at least one loop to block
dimensions and at least one loop to thread dimensions. If either is not
the case, a loop would get mapped twice.

Differential Revision: https://reviews.llvm.org/D73685
mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
mlir/test/Conversion/LoopsToGPU/no_blocks_no_threads.mlir [new file with mode: 0644]