intel / llvm

Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects.
Other
1.2k stars 713 forks source link

cf_protection unsupported option for target AArch64 #14458

Closed lorenzo-carpentieri closed 1 week ago

lorenzo-carpentieri commented 1 week ago

Describe the bug

I'm compiling DPC++ (commit) on OrangePi 5 Plus equipped with a Rockchip RK3588 8-core 64-bit processor, quad-core A76+quad-core A55 with an integrated ARM Mali-G610 GPU. The DPC++ compilation process ends with:

error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target

To reproduce

  1. Configure command: python3 ./configure.py -t Release -o BUILD_PATH --cmake-gen "Unix Makefiles" --host-target="AArch64
  2. Compile command: python3 ./compile.py -o BUILD_PATH -j 8
  3. Error: error: option 'cf-protection=return' cannot be specified on this target

Environment

Additional context

No response

coldav commented 1 week ago

Note related fix https://github.com/intel/llvm/commit/00915ba7d6999a7d4c3cb62cf60fe8117310346f

dm-vodopyanov commented 1 week ago

@coldav thanks for the fix. Am I correct that the issue is resolved now? @lorenzo-carpentieri hello, thanks for the report, did https://github.com/intel/llvm/commit/00915ba7d6999a7d4c3cb62cf60fe8117310346f help you?

coldav commented 1 week ago

@coldav thanks for the fix. Am I correct that the issue is resolved now? @lorenzo-carpentieri hello, thanks for the report, did 00915ba help you?

I don't know if it fixes your issue - but it definitely seems related. If the user can give more information on where the error occurs that could help (if my fix does not help).

lorenzo-carpentieri commented 1 week ago

Thank you for your quick reply. The fix solved the problem and I compiled DPC++ correctly. However, the sycl-ls --verbose command generates a SYCL exception. I also tried two implementations of a vector addition (1) allocating the data with USM malloc_device and (2) with buffer/accessor.

(1) fail with USM Device does not support USM device allocations! After some investigation, I think is related to the fact that orange PI Plus does not support FINE_GRAIN svmAlloc. Am I right?

(2) fail with Native API failed. Native API returns: -30 (PI_ERROR_INVALID_VALUE) -30 (PI_ERROR_INVALID_VALUE). With buffer/ accessor I think the problem is the same.

image

coldav commented 1 week ago

Although this is closed you might want to try with SYCL_PI_TRACE=-1, which should give a bit more information about what has failed.