clang with host and accelerator bitcode

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

clang with host and accelerator bitcode

Hollman, Daisy Sophia via cfe-dev
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
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang with host and accelerator bitcode

Hollman, Daisy Sophia via cfe-dev
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 <[hidden email]> написал(а):
>
> 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
>
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang with host and accelerator bitcode

Hollman, Daisy Sophia via cfe-dev
Alexey Bataev <[hidden email]> writes:

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

Thanks!  That helped.  It turns out I needed a few other things for my
use-case but this got me unblocked and I was able to figure it out.

             -David
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: clang with host and accelerator bitcode

Hollman, Daisy Sophia via cfe-dev
Glad it helped.

Best regards,
Alexey Bataev

> 8 сент. 2020 г., в 12:58, David Greene via cfe-dev <[hidden email]> написал(а):
>
> Alexey Bataev <[hidden email]> writes:
>
>> I think you need to add "-fopenmp -fopenmp-targets=..." to make clang to understand that bundler/unbundler is required.
>
> Thanks!  That helped.  It turns out I needed a few other things for my
> use-case but this got me unblocked and I was able to figure it out.
>
>             -David
>
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev