forked from ROCm/HIPIFY
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HIPIFY][ROCm#1617][fp8][tests] Support for
fp8
math - Part 3 - Tests
+ Added missing header files mapping + Updated the regenerated `hipify-perl` + [MISC] Minor fixes in the rest of synthetic tests
- Loading branch information
Showing
23 changed files
with
83 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
tests/unit_tests/synthetic/libraries/cudevice2hipdevice.cu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// RUN: %run_test hipify "%s" "%t" %hipify_args 3 --amap --skip-excluded-preprocessor-conditional-blocks --experimental %clang_args -ferror-limit=500 | ||
|
||
// CHECK: #include <hip/hip_runtime.h> | ||
#include <cuda_runtime.h> | ||
#include <stdio.h> | ||
// CHECK: #include "hip/hip_fp8.h" | ||
#include "cuda_fp8.h" | ||
// CHECK-NOT: #include "hip/hip_fp8.h" | ||
// CHECK-NOT: #include "cuda_fp8.h" | ||
|
||
int main() { | ||
printf("24. CUDA Device API to HIP Device API synthetic test\n"); | ||
|
||
#if CUDA_VERSION >= 11080 | ||
// CHECK: __hip_fp8_storage_t fp8_storage_t; | ||
__nv_fp8_storage_t fp8_storage_t; | ||
|
||
// CHECK: __hip_fp8x2_storage_t fp8x2_storage_t; | ||
__nv_fp8x2_storage_t fp8x2_storage_t; | ||
|
||
// CHECK: __hip_fp8x4_storage_t fp8x4_storage_t; | ||
__nv_fp8x4_storage_t fp8x4_storage_t; | ||
|
||
// CHECK: __hip_fp8_e5m2_fnuz fp8_e5m2; | ||
__nv_fp8_e5m2 fp8_e5m2; | ||
|
||
// CHECK: __hip_fp8x2_e5m2_fnuz fp8x2_e5m2; | ||
__nv_fp8x2_e5m2 fp8x2_e5m2; | ||
|
||
// CHECK: __hip_fp8_e4m3_fnuz fp8_e4m3; | ||
__nv_fp8_e4m3 fp8_e4m3; | ||
|
||
// CHECK: __hip_fp8x2_e4m3_fnuz fp8x2_e4m3; | ||
__nv_fp8x2_e4m3 fp8x2_e4m3; | ||
|
||
// CHECK: __hip_fp8x4_e4m3_fnuz fp8x4_e4m3; | ||
__nv_fp8x4_e4m3 fp8x4_e4m3; | ||
|
||
// CHECK: __hip_saturation_t saturation_t; | ||
// CHECK-NEXT: __hip_saturation_t NOSAT = __HIP_NOSAT; | ||
// CHECK-NEXT: __hip_saturation_t SATFINITE = __HIP_SATFINITE; | ||
__nv_saturation_t saturation_t; | ||
__nv_saturation_t NOSAT = __NV_NOSAT; | ||
__nv_saturation_t SATFINITE = __NV_SATFINITE; | ||
|
||
// CHECK: __hip_fp8_interpretation_t fp8_interpretation_t; | ||
// CHECK-NEXT: __hip_fp8_interpretation_t E4M3 = __HIP_E4M3_FNUZ; | ||
// CHECK-NEXT: __hip_fp8_interpretation_t E5M2 = __HIP_E5M2_FNUZ; | ||
__nv_fp8_interpretation_t fp8_interpretation_t; | ||
__nv_fp8_interpretation_t E4M3 = __NV_E4M3; | ||
__nv_fp8_interpretation_t E5M2 = __NV_E5M2; | ||
|
||
// CHECK: __hip_fp8x4_e5m2_fnuz fp8x4_e5m2; | ||
__nv_fp8x4_e5m2 fp8x4_e5m2; | ||
#endif | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters