This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Build most of common/src for amdgcn
ClosedPublic

Authored by JonChesterfield on Dec 12 2019, 5:10 PM.

Details

Summary

[libomptarget] Build most of common/src for amdgcn

Excluding parallel.cu, which uses an integer min() from cuda,
Excluding support.cu, which calls malloc that is not yet available for amdgcn

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2019, 5:10 PM

Enabled by D71404. D71382 is sufficient to compile support.cu if device declarations for malloc, free are provided.

Excluding parallel.cu, which uses an integer min() from cuda,
Excluding support.cu, which calls malloc that is not yet available for amdgcn

Couldn't we provide these functions in the target_impl.h of amdgcn?

I would also rename the files to cpp as they seem to not contain CUDA anymore, correct?

Couldn't we provide these functions in the target_impl.h of amdgcn?

Indeed. That's the plan. Both have a degree of design choice about them though so were excluded from this patch.

I would also rename the files to cpp as they seem to not contain CUDA anymore, correct?

They do not contain CUDA, other than the atomic functions which could be argued are just C++ anyway, as they appear in the amdgcn implementation. Renaming the files should be done separately to this though as it may upset the nvcc build (and definitely won't upset the amdgcn one).

How do you feel about landing this while I look into the other three points?

This revision is now accepted and ready to land.Dec 13 2019, 9:20 AM
This revision was automatically updated to reflect the committed changes.