This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nvptx offloading patches [3/n], RFD

On Tue, Feb 17, 2015 at 04:32:06PM +0300, Ilya Verbin wrote:
> > If we don't try to write .gnu.offload_lto_* again, I think following patch
> > with additionally not calling lto_write_mode_table for !lto_stream_offload_p
> > and not calling lto_input_mode_table for !ACCEL_COMPILER - instead build
> > a single shared identity table - might actually work.
> > 
> > Thoughts on this?
> Probably the ACCEL_COMPILER in WPA mode (flag_wpa) can read .gnu.offload_lto_*
> sections and produce temporary partitions with .gnu.lto_* sections.  And the
> ACCEL_COMPILER in LTRANS mode (flag_ltrans) will read .gnu.lto_* sections?

FYI, I have tested my mode_table patch with the intelmic emul offloading and
saw no regressions.

Then I went over and wanted to try nvptx offloading, but running into
various issues.

I had two patches from Bernd (already approved, why they haven't been
installed?) applied, had to tweak the first one so that it applies,
then my mode_table patch.
I've built nvptx-tools and configured:
../configure --target=nvptx-none --enable-as-accelerator-for=x86_64-pc-linux-gnu --with-build-time-tools=/usr/src/gcc/objnvptxinst/usr/local/nvptx-none/bin --disable-sjlj-exceptions --enable-newlib-io-long-long
make -j16
This failed miserably, because of missing mkoffload.o dependencies, patch attached
(ok for trunk?; it does what intelmic mkoffload.o does; I've tried to add
| $(generated_files) dependency instead, but that somehow didn't work).

The second attempt with that fixed died because for some reason
nvptx-none-as wants to verify by default using ptxas.  Can that be made
configurable?  E.g. for building nvptx offloading in distros, I believe
due to the proprietary cuda stuff it will be better if everything can be
built without the proprietary stuff and only used when actually running it.
E.g. could the verification be done by default only if ptxas is found in
$PATH and not if it isn't found?

Third attempt failed with:
../../../libgcc/config/nvptx/realloc.c:24:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
../../../libgcc/ recipe for target 'realloc.o' failed
make[2]: *** [realloc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/usr/src/gcc/objnvptx/nvptx-none/libgcc'
I have nvptx-newlib symlinked into the gcc tree as newlib, so I expected it
would be built in-tree, is that not the case (at least wiki/Offloading
mentions that).  Or is it just that libgcc can't really have dependencies on
newlib headers as newlib is built after libgcc?


Attachment: bernds1
Description: Text document

Attachment: bernds2
Description: Text document

Attachment: V492
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]