start with predefined macros
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
55 | The fma macro was actually from the opencl spec but never handled in the correct place |
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
63 | It is my mistake. Did not consider consistency when designing this macro. |
I would recommend to introduce __AMDGCN_WAVEFRONT_SIZE__ as an alias for '__AMDGCN_WAVEFRONT_SIZE and at some point to deprecate the latter.
Otherwise, LGTM
Added __AMDGCN_WAVEFRONT_SIZE__ in https://reviews.llvm.org/D154207. will update the documentation
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
21 | "on amdgpu target" doesn't sound grammatical |
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
47 | This set of feature macros is tricky. A feature macro is defined only when the corresponding target feature has been explicitly specified during compilation; otherwise it's undefined. Users will have to refer to the target feature table to get the semantic of each state. For example, for xnack, undefined=="any", 1 for xnack+, 0 for xnack-. Is there a reason we don't support features other than sramecc and xnack? |
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
47 | This macro is designed to support Target ID only, therefore it is only emitted when target ID containing the feature is used. The target ID features are stable since they are used to select code objects from fat binaries. My understanding is that other features used by amdgpu backend do not have stable feature names, therefore are not suitable to be used as predefined macros for users to condition their code. |
clang/docs/AMDGPUSupport.rst | ||
---|---|---|
47 | The current wording seems to imply that a feature macro is always defined if that target feature is supported but that's not the case. For example, the macro amdgcn_feature_xnack is undefined if a user compiles for xnack="any". |
"on amdgpu target" doesn't sound grammatical