-
Notifications
You must be signed in to change notification settings - Fork 797
Closed
Description
cpuid.h
is assumed to exist in sycl/source/detail/platform_util.cpp
and that file in general assumes x86 features.
Given that LLVM supports "all the architectures", I wonder if there is a way to reuse code from other LLVM components to make the SYCL RT architecture agnostic.
Source
sycl/source/detail/platform_util.cpp
#if defined(SYCL_RT_OS_LINUX)
#include <cpuid.h>
#elif defined(SYCL_RT_OS_WINDOWS)
#include <intrin.h>
#endif
Build error
FAILED: tools/sycl/source/CMakeFiles/sycl_object.dir/detail/platform_util.cpp.o
/usr/bin/c++ -DCL_TARGET_OPENCL_VERSION=220 -DXPTI_ENABLE_INSTRUMENTATION -DXPTI_STATIC_LIBRARY -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/sycl/source -I/home/ubuntu/ISYCL/llvm/sycl/source -Iinclude -I/home/ubuntu/ISYCL/llvm/llvm/include -I/home/ubuntu/ISYCL/llvm/xpti/include -I/home/ubuntu/ISYCL/llvm/sycl/include -Itools/sycl/OpenCL/inc -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wextra -Wno-deprecated-declarations -O3 -UNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT tools/sycl/source/CMakeFiles/sycl_object.dir/detail/platform_util.cpp.o -MF tools/sycl/source/CMakeFiles/sycl_object.dir/detail/platform_util.cpp.o.d -o tools/sycl/source/CMakeFiles/sycl_object.dir/detail/platform_util.cpp.o -c /home/ubuntu/ISYCL/llvm/sycl/source/detail/platform_util.cpp
/home/ubuntu/ISYCL/llvm/sycl/source/detail/platform_util.cpp:14:10: fatal error: cpuid.h: No such file or directory
14 | #include <cpuid.h>
| ^~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "../llvm/buildbot/compile.py", line 65, in <module>
ret = main()
File "../llvm/buildbot/compile.py", line 61, in main
return do_compile(args)
File "../llvm/buildbot/compile.py", line 39, in do_compile
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '/home/ubuntu/ISYCL/llvm/build', '--', 'deploy-sycl-toolchain', 'deploy-opencl-aot', '-j', '1']' returned non-zero exit status 1.
Metadata
Metadata
Assignees
Labels
No labels