[cfe-dev] clang with host and accelerator bitcode

Alexey Bataev via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 2 12:20:44 PDT 2020


I think you need to add "-fopenmp -fopenmp-targets=..." to make clang to understand that bundler/unbundler is required.

Best regards,
Alexey Bataev

> 2 сент. 2020 г., в 12:49, David Greene via cfe-dev <cfe-dev at lists.llvm.org> написал(а):
> 
> Hi,
> 
> How does one use clang to link a program with host and accelerator code
> when the inputs are host and accelerate bitcode files.  I tried using
> clang-offload-bundler and feeding the output of that to clang but clang
> doesn't like it.  I tried feeding both bitcode files to clang:
> 
> clang -o test host.bc accel.bc
> 
> but I get this:
> 
> warning: overriding the module target triple with x86_64-unknown-linux-gnu [-Woverride-module]
> Allocation instruction pointer not in the stack address space!
>  %n.addr = alloca i64, align 8, addrspace(5)
> Allocation instruction pointer not in the stack address space!
>  %c_f.addr = alloca [100000 x float]*, align 8, addrspace(5)
> Allocation instruction pointer not in the stack address space!
>  %a_f.addr = alloca [100000 x float]*, align 8, addrspace(5)
> Allocation instruction pointer not in the stack address space!
>  %b_f.addr = alloca [100000 x float]*, align 8, addrspace(5)
> in function __omp_offloading_fe05_4310cf57_main_l48
> fatal error: error in backend: Broken function found, compilation aborted!
> 
> llc doesn't work either:
> 
> llc -o test host.bx accel.bc
> 
> llc: Too many positional arguments specified!
> Can specify at most 1 positional arguments: See: llc --help
> 
> Is there a way to do this?
> 
>              -David
> 


More information about the cfe-dev mailing list