This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert shenanigans for launching kernels with clang.
The code being reverted compiles, but doesn't actually work -- in fact, we end up generating no code on the device at all! The problem is that triple_chevron_launcher_base is a templated class, and so we only instantiate functions that are actually called. When compiling for device, we would never instantiate the __host__ function, so we never observed the kernel being referenced, so we never generated any code for it. clang was actually wrong to reject this code. If the launch functions were __device__, clang would have been right. But being __host__ __device__, clang should wait to emit an error until it sees the HD function being *used* on the device side. If the function is never used on the device side, it's fine to do any host-only things from the HD function. As of r283963 [1], clang now does the right thing. [1] llvm-mirror/clang@f3d02c1
- Loading branch information
Justin Lebar
committed
Oct 12, 2016
1 parent
fd0e6e4
commit b647398
Showing
2 changed files
with
1 addition
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters