-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fail to run kernels with the JIT compiler #1432
Comments
This error message is quite clear: Apparently the kernel calls into EDIT: Missed your code snippet. Using @fodinabor - probably host JIT does not take into account |
Thanks, without the #include <sycl/sycl.hpp>
void kernel(sycl::nd_item<1> item){
bool more = true;
while ( (item.barrier(), sycl::any_of_group(item.get_group(), more)) ) {
more = false;
}
item.barrier();
}
int main(int argc, char** argv){
int threadsPerBlock = 64;
int blocks = 1;
static const std::vector<sycl::device> devices = sycl::device::get_devices(sycl::info::device_type::all);
if (argc < 2) {
std::cout << "Provide the device number N: ./any_of_group N" << std::endl;
return 1;
}
auto stream = sycl::queue{devices[atoi(argv[1])]};
std::cerr << "stream offload to " << stream.get_device().get_info<sycl::info::device::name>() << " ["
<< stream.get_device().get_info<sycl::info::device::driver_version>() << "]" << std::endl;
stream.submit([&](sycl::handler &cgh) {
cgh.parallel_for(
sycl::nd_range<1>( blocks * threadsPerBlock, threadsPerBlock),
[=](sycl::nd_item<1> item) {
kernel(item);
});
});
} fails with the error (Intel GPU - OpenCL, the other backends just say that the kernel could not be constructed):
|
This is expected; group algorithms other than |
AdaptiveCpp assumes the existence of a correctly configured clang, e.g by using clang configuration files and building AdaptiveCpp against a wrapper clang that automatically correctly sets necessary flags as described here: https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/doc/install-llvm.md#gcc-toolchainc-standard-library-is-in-a-non-standard-location
I strongly suspect that a correct clang installation with clang configuration files will resolve the remaining issue. |
Bug summary
A simple application compiles but fails to run with the JIT compiler. AOT compilation with CUDA results in a working executable.
I'm afraid I've missed something when building acpp, but I can't figure out what's wrong.
The CPU through OpenCL works, while the CUDA backend, the Intel GPU (with both OpenCL and Level Zero), and the host device fail.
CUDA output:
Intel GPU (OpenCL):
Host:
In this case, it cannot find
crtbeginS.o
and-lstdc++
(at least the first is in the path set with the--gcc-install-dir
flag).To Reproduce
test.cpp
:compile and run:
Expected behavior
It should run without errors
Describe your setup
develop@57773099 + PR 1031
and built with:gcc (GCC) 11.4.1 20230601
Optional additional diagnostic information
syclcc --hipsycl-version
I see:The text was updated successfully, but these errors were encountered: