start with example usage, predefined macros, and path setting.
Details
Diff Detail
Event Timeline
clang/docs/HIPSupport.rst | ||
---|---|---|
105 | Should we include the gfxNNN or GFXN macros here? What about wave size, and CU mode? And what about unsafe FP atomics macro? |
clang/docs/HIPSupport.rst | ||
---|---|---|
105 | Those are not only for HIP but for all languages targeting amdgpu. I am thinking we probably need a separate page for amdgpu support by clang. |
clang/docs/HIPSupport.rst | ||
---|---|---|
34 | can we add -xhip to enable HIP for files without the .hip file ext? | |
57 | I'd suggest adding a section to cover compiler options to pass various hip/rocm related paths and that using the compiler options would be a much more preferable alternative. | |
88 | I think this macro is essentially an alias to HIP? | |
100 | It might be helpful to provide more context here as to how a HIP source file gets compiled (once for the host and then once for each device arch). Also I'd suggest moving this up closer to HIP given they are related. |
clang/docs/HIPSupport.rst | ||
---|---|---|
83 | I think it would be easier to understand by explicitly calling out the order of precedence:
|
clang/docs/HIPSupport.rst | ||
---|---|---|
83 | wil do |
clang/docs/HIPSupport.rst | ||
---|---|---|
34 | Aren't you supposed to use clang++? Also, could show that .hip is recognized? |
clang/docs/HIPSupport.rst | ||
---|---|---|
34 | good point. will fix |
clang/docs/HIPSupport.rst | ||
---|---|---|
24 | I thought the idea of HIP was to also target Nvidia GPU? Otherwise I do not understand "portable applications for GPUs" above. | |
33 | I suggest giving also a simpler example without -c to generate directly an executable without split compile and link. | |
35–37 | ||
141 | Should this one be with underscores too? |
clang/docs/HIPSupport.rst | ||
---|---|---|
24 | Thinking to the fact this is used by other projects like https://github.com/CHIP-SPV/chipStar this is even wider but at the same time that project is not up-streamed. |
clang/docs/HIPSupport.rst | ||
---|---|---|
24 | will add a brief description of HIP support on other devices. | |
33 | will do | |
35–37 | will fix | |
141 | This is due to design inconsistency. The same with __HIP_NO_IMAGE_SUPPORT. Since these two macros are new and not widely used, renaming them won't cause significant interruptions. I will let clang emit __HIP_NO_IMAGE_SUPPORT__ and __HIP_API_PER_THREAD_DEFAULT_STREAM__ and make the current ones alias and document them as deprecated. The macros for HIP memory scope were designed by following the naming convention of clang atomic macros e.g. __ATOMIC_RELAXED, __OPENCL_MEMORY_SCOPE_WORK_ITEM, therefore they will not be changed. |
clang/docs/HIPSupport.rst | ||
---|---|---|
66 | What does hip-link do? Why is it needed? I never use it and it works |
clang/docs/HIPSupport.rst | ||
---|---|---|
66 | It indicates HIP offloading at the linking stage and creates the HIP toolchain. For -fno-gpu-rdc mode, it locates the HIP runtime library and links it. For -fgpu-rdc mode, it unbundles object files and does device linking and embedding. |
clang/docs/HIPSupport.rst | ||
---|---|---|
31 | Fix the spelling when we talk about the Khronos SPIR-V standard, by opposition to tool names. | |
66 | I am a little lost here. clang++ --offload-arch=gfx906 -xhip sample.cpp -o sample since it should be obvious to the Driver that we want to produce a working program for a GPU. |
clang/docs/HIPSupport.rst | ||
---|---|---|
31 |
will do | |
66 | Currently, the linker will only link HIP runtime library when --hip-link is specified. The linker does not see -xhip sample.cpp. It only sees the intermediate obj files passed to it, therefore it does not know it is for HIP. This could be improved by letting the clang driver add an implicit --hip-link option to the linker when the driver sees the linking of HIP input files. However, this needs a separate patch. |
I thought the idea of HIP was to also target Nvidia GPU? Otherwise I do not understand "portable applications for GPUs" above.