intel / llvm

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

intel cpu linking failed #14943

Open programmer-lxj opened 1 month ago

programmer-lxj commented 1 month ago

Describe the bug

configure and compile and check have't problem. I compile the sample code is also no problem: clang++ -fsycl simple-sycl-app.cpp -o simple-sycl-app.o. But I execute it report the following error : ./simple-sycl-app.o Linking started Never resolved value found in function (Producer: 'Intel.oneAPI.DPCPP.Compiler_2022.1.0' Reader: 'Intel.oneAPI.DPCPP.Compiler_2022.1.0')Linking failed.

Thank you for your help, looking forward to your reply!

To reproduce

  1. Include a code snippet that is as short as possible
  2. Specify the command which should be used to compile the program
  3. Specify the command which should be used to launch the program
  4. Indicate what is wrong and what was expected

Environment

Additional context

No response

AlexeySachkov commented 1 month ago

Hi @programmer-lxj, could you please provide information which compiler version are you using and also an output of sycl-ls --verbose?

programmer-lxj commented 2 weeks ago

Hi @programmer-lxj, could you please provide information which compiler version are you using and also an output of sycl-ls --verbose?

Dear professor, Thank you very much for your reply. I deleted the previous container environment and I forgot about this information. What I want to do is to make onednn support TPU. I tried to modify the onednn source code some time ago and add a tpu interface to the gpu branch, but I found that memory allocation uses sycl::malloc_shared. I originally wanted to explicitly call the TPU memory allocation function here, but this will destroy the original onednn call on the gpu. I would like to ask if it is necessary to write these two programs of the type llvm/sycl/plugins/cuda/pi_cuda.cpp(.hpp)? These two programs are a bit complicated and I don't quite understand them for now. Can't I directly modify the source code in onednn to support TPU? Thank you for your help, looking forward to your reply!