Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify host compiler for xocc? #68

Open
j-stephan opened this issue Sep 18, 2019 · 3 comments
Open

How to specify host compiler for xocc? #68

j-stephan opened this issue Sep 18, 2019 · 3 comments
Labels
question Further information is requested

Comments

@j-stephan
Copy link
Member

I am currently facing some troubles while getting the SYCL compiler to run on a cluster equipped with Alveo U200 FPGAs. The cluster is running CentOS; unfortunately all default system tools are so ancient that they'd actually belong into a museum. The cluster's module system allows me to load more recent compilers and libraries, so I was able to compile the SYCL compiler (with some changes to sycl-clang's include files and overriding system include directories).

Running it opens up another can of worms since the Xilinx tools don't seem to play nice with the module system. xocc doesn't even consider using the compiler defined by the environment variables, instead it always wants to call /usr/bin/g++ through the xcpp wrapper. It also doesn't use the include directories I gave to the sycl-clang frontend, which causes the called g++ to fail because it doesn't find the standard library includes.

So far I tried adjusting the environment variables for the compiler (CPATH, CPLUS_INCLUDE_PATH, LD_LIBRARY_PATH) as well as copying xcpp to a local PATH and modifying the call to gcc, all to no avail or even more weird problems with header files and libraries.

is there some obvious way I'm missing that doesn't require any system-wide changes? I can't write to the SDAccel installation directory or any other system directory since I don't have root privileges.

@keryell
Copy link
Member

keryell commented Sep 18, 2019

Yes, this is complex... :-(
But do you need to use such a host compiler if you are not using software or hardware emulation with xocc?
If you want to use hardware or software emulation, you might just use a modern machine instead of a cluster node with FPGA access.
Could it be possible to actually just compile on another machine and just have XRT to load the program on the cluster? Perhaps you can link a lot of stuff statically too...

@j-stephan j-stephan added the question Further information is requested label Sep 19, 2019
@j-stephan
Copy link
Member Author

Could it be possible to actually just compile on another machine and just have XRT to load the program on the cluster?

That worked surprisingly well, despite a (slight) version mismatch between my local machine and the cluster's modules. I can successfully execute the examples on FPGA hardware this way.

But do you need to use such a host compiler if you are not using software or hardware emulation with xocc?

It would be nice to be able to launch build jobs over night on the cluster, especially for the hardware synthesizing. My co-workers work directly on the cluster, so passing build scripts around would also be superior to everyone setting up the toolchain on their local OS (which might not be Ubuntu 19.04)...

@keryell
Copy link
Member

keryell commented Sep 19, 2019

An easy way is to have everything modern on the cluster.
With modern software and languages, less global warming at the end of the day because of a more efficient use of hardware and brains. :-)
This is probably possible to spend a lot of IT time to install all the modern dependencies on top of an obsolete OS... No easy answer...
A container approach providing all the modern SYCL compilation stack could be a good compromise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants