-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,22 +156,22 @@ Unlike `__CUDA_ARCH__`, the `__HIP_DEVICE_COMPILE__` value is 1 or undefined, an | |
### Compiler Defines: Summary | ||
|Define | HIP-Clang | nvcc | Other (GCC, ICC, Clang, etc.) | ||
|--- | --- | --- |---| | ||
|HIP-related defines:| | ||
|`__HIP_PLATFORM_AMD__`| Defined | Undefined | Defined if targeting AMD platform; undefined otherwise | | ||
|`__HIP_PLATFORM_NVIDIA__`| Undefined | Defined | Defined if targeting NVIDIA platform; undefined otherwise | | ||
|`__HIP_DEVICE_COMPILE__` | 1 if compiling for device; undefined if compiling for host |1 if compiling for device; undefined if compiling for host | Undefined | ||
|`__HIPCC__` | Defined | Defined | Undefined | ||
|`__HIP_ARCH_*` |0 or 1 depending on feature support (see below) | 0 or 1 depending on feature support (see below) | 0 | ||
|nvcc-related defines:| | ||
|`__CUDACC__` | Defined if source code is compiled by nvcc; undefined otherwise | Undefined | ||
|`__NVCC__` | Undefined | Defined | Undefined | ||
|`__CUDA_ARCH__` | Undefined | Unsigned representing compute capability (e.g., "130") if in device code; 0 if in host code | Undefined | ||
|Define | HIP-Clang | NVCC | Other (GCC, ICC, Clang, etc.) | ||
|--- | --- | --- |--- | | ||
|HIP-related defines: | | ||
|`__HIP_PLATFORM_AMD__` | Defined | Undefined | Defined if targeting AMD platform; undefined otherwise | | ||
|`__HIP_PLATFORM_NVIDIA__` | Undefined | Defined | Defined if targeting NVIDIA platform; undefined otherwise | | ||
|`__HIP_DEVICE_COMPILE__` | 1 if compiling for device; undefined if compiling for host | 1 if compiling for device; undefined if compiling for host | Undefined | ||
|`__HIPCC__` | Defined | Defined | Undefined | ||
Check failure on line 165 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
|`__HIP_ARCH_*` | 0 or 1 depending on feature support (see below) | 0 or 1 depending on feature support (see below) | 0 | ||
|nvcc-related defines: | | ||
|`__CUDACC__` | Defined if source code is compiled by nvcc; undefined otherwise | Undefined | ||
Check failure on line 168 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
|`__NVCC__` | Undefined | Defined | Undefined | ||
Check failure on line 169 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
|`__CUDA_ARCH__` | Undefined | Unsigned representing compute capability (e.g., "130") if in device code; 0 if in host code | Undefined | ||
Check failure on line 170 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
|hip-clang-related defines:| | ||
|`__HIP__` | Defined | Undefined | Undefined | ||
|HIP-Clang common defines:| | ||
|`__clang__` | Defined | Defined | Undefined | Defined if using Clang; otherwise undefined | ||
|`__HIP__` | Defined | Undefined | Undefined | ||
Check failure on line 172 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
|HIP-Clang common defines: | | ||
|`__clang__` | Defined | Defined | Undefined | Defined if using Clang; otherwise undefined | ||
Check failure on line 174 in docs/how-to/hip_porting_guide.md GitHub Actions / Documentation / MarkdownHard tabs
|
||
## Identifying Architecture Features | ||
|