Grafik Komit

319 Melakukan

Penulis SHA1 Pesan Tanggal
Evgeny Mankov 0c9b661d56 [HIPIFY][perl] Code clean-up before continuing generation 2019-09-28 20:44:15 +03:00
Evgeny Mankov f21e7d8abc [HIPIFY] Generate more hipify-perl (continuation)
+ Minor hipify-perl clean-up
+ Minor CUDA2HIP_Perl refactoring
2019-09-27 19:10:54 +03:00
Evgeny Mankov f50852e3a6 [HIPIFY] Add supported fp16 functions
+ Update hipify-perl accordingly
2019-09-26 18:13:20 +03:00
Evgeny Mankov 9d1d4b78e3 [HIPIFY][#1439] Add reinterpret_cast to args of some functions
+ Perl part of [#1458]
+ Affected functions: hipFuncSetCacheConfig, hipFuncGetAttributes
+ Implement function generateHostFunctions() in hipify-clang for that purposes
+ Update hipify-perl accordingly
2019-09-25 18:53:17 +03:00
Evgeny Mankov 6ac0baf026 [HIPIFY][perl] Get rid of obsolete warnings on cuBLAS and cuRAND 2019-09-25 17:37:41 +03:00
Evgeny Mankov 1b989bcb8d [HIPIFY][#1435][perl] Add HIP_SYMBOL wrapper to the templated Device Symbol argument of the following functions:
cudaMemcpyToSymbol, cudaMemcpyToSymbolAsync, cudaGetSymbolSize, cudaGetSymbolAddress, cudaMemcpyFromSymbol, cudaMemcpyFromSymbolAsync

+ Perl part of [#1441]
+ Implement function generateSymbolFunctions() in hipify-clang for that purposes
+ Update hipify-perl

TODO: Eliminate dim3() issue in hipify-perl as well
2019-09-21 07:33:17 +03:00
Evgeny Mankov f0b1170784 [HIPIFY][#1437] Fix: cudaFuncGetAttributes to hipFuncGetAttributes is supported
+ Update hipify-perl and CUDA_Runtime_API_functions_supported_by_HIP.md accordingly
2019-09-18 17:57:31 +03:00
Evgeny Mankov fc493da5c7 [HIPIFY] Add supported device functions (from device_functions.h)
+ [perl] Sync hipify-perl accordingly
2019-09-18 17:07:50 +03:00
Evgeny Mankov 042c125601 [HIPIFY] Add supported device functions (from math_functions.h)
+ [perl] Add generation of sub countSupportedDeviceFunctions
+ [FIX] Do not perform any replacement for supported device functions
+ [perl] Sync hipify-perl accordingly
2019-09-17 16:17:28 +03:00
Evgeny Mankov 4f59ec25fe [HIPIFY][perl][fix] Treat ::device_function as a device function
+ Do not treat somenamespace::device_function_name as a device function
+ Fix generation of warnUnsupportedDeviceFunctions function in hipify-clang
+ Update hipify-perl based on hipify-clang -perl generation
+ Update device test math_functions.cu for hipify-perl

[Restrictions]
- hipify-perl is yet unable to handle function declarations in user namespaces
- hipify-perl is yet unable to handle using directive
2019-09-16 17:36:55 +03:00
ansurya ceb734b917 Added new device attributes (#1377)
* Added new device attributes

* updated comment

* updated with new device attributes supported
2019-09-16 08:31:30 +00:00
Evgeny Mankov 287ceac229 [HIPIFY][perl] Syn with hipify-clang 2019-09-15 15:25:40 +03:00
Evgeny Mankov 56ab105e9d [HIPIFY][#1400] Fix Template Instantiation kernel launch (clang & perl)
+ Enclose template instantiation kernel calls into round brackets, leave regular kernel names unchanged (hipify-perl doesn't handle cases with macros).
+ Fix corresponding tests.

PS. hipify-perl couldn't handle correctly the following cases due to macros expansion disability, thus hipify-clang should be used instead:

#define KERNEL_NAME_MACRO axpy<float>
#define KERNEL_CALL_MACRO axpy<float><<<1, 2>>>
#define KERNEL_ARG_LIST_MACRO a, x, y

// CUDA:
KERNEL_NAME_MACRO<<<1, 2>>>(KERNEL_ARG_LIST_MACRO);
KERNEL_CALL_MACRO(KERNEL_ARG_LIST_MACRO);

// hipify-perl:
hipLaunchKernelGGL(KERNEL_NAME_MACRO, dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
KERNEL_CALL_MACRO(KERNEL_ARG_LIST_MACRO);

// hipify-clang:
hipLaunchKernelGGL((KERNEL_NAME_MACRO), dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
hipLaunchKernelGGL((axpy<float>), dim3(1), dim3(2), 0, 0, KERNEL_ARG_LIST_MACRO);
2019-09-10 15:59:06 +03:00
Evgeny Mankov 3a034a3427 [HIPIFY][perl] Code cleanup (preparation for generating) 2019-09-05 11:52:59 +03:00
Evgeny Mankov 2a4c008385 [HIPIFY][perl] Sync hipify-perl with hipify-clang
Sync by means of semi-automatic generation: hipify-clang -perl
2019-09-04 17:07:45 +03:00
Evgeny Mankov 5b8843a127 [HIPIFY][perl] Code cleanup and formatting 2019-09-04 16:37:26 +03:00
Evgeny Mankov b98330609b [HIPIFY][perl][#259] Fix
empty<<<1, 2>>> ( );     >>  hipLaunchKernelGGL(empty, dim3(1), dim3(2), 0, 0);
empty<<<1, 2, 0>>>();    >>
empty<<<1, 2, 0, 0>>>(); >>

instead of erroneous:    >> hipLaunchKernelGGL((empty), dim3(1), dim3(2), 0, 0, );
2019-09-03 16:44:20 +03:00
Yaxun (Sam) Liu b046ec698b Do not change opt level for -g for hip-clang (#1369)
Currently hipcc uses -O3 for hip-clang by default but uses -O0 if -g is used. This
causes surprise for users since -g should not affect default opt level.
2019-08-29 01:03:11 +00:00
Sarbojit2019 938502dfcb [hipcc] Fix for uninitialized variables on nvcc path
Fixes #1186
2019-08-20 12:06:22 +00:00
Maneesh Gupta 3ccddcde25 Bump HIP version (#1311)
- Match HIP version with upcoming ROCm version
- Add githash to version string
2019-08-09 12:13:29 +00:00
Rene van Oostrum 05b685cc6b Add missing hipHostRegister flags to hipify-perl for flags that are defined and supported in hip_runtime_api.h 2019-08-08 10:46:45 -05:00
Maneesh Gupta ce7469ba20 Merge pull request #1305 from ROCm-Developer-Tools/fix-hip-vdi-include-clang
Fix HIP-VDI using incorrect include files
2019-08-08 08:28:20 +00:00
Aaron Enye Shi 80a3897f9e Fix HIP-VDI using incorrect include files
When HIP-VDI depends on an llvm-amdgpu package, the include clang directory is not properly assessed.
2019-08-07 16:59:17 -04:00
David Rohr a90310162d Treat .cxx files like .cpp files 2019-08-07 19:11:35 +02:00
Yaxun (Sam) Liu f467cb850e Fix -std=c++14 for windows 2019-07-31 16:36:47 -04:00
ansurya 50597e2085 Add HSA_PATH to hip_Includes in cmake and hipconfig (#1260)
* Add HSA_PATH to hip_Includes in cmake and hipconfig

* HSA_PATH to CACHE path,checks for HSA include path

* Removed new lines at EOF
2019-07-31 05:02:20 +00:00
Aaron Enye Shi b754de37c1 Add GFX908 specific changes to HIP (#1229)
* Add GFX908 specific for HIP

* Fix missing __halfTest in hipTestNativeHalf
2019-07-24 07:51:17 +00:00
ansurya 8e496c09d9 Add Max Texture 1D,2D,3D device properties (#1226)
* Add Max Texture 1D,2D,3D device properties

* Corrected testcase to use enums defined in hipDeviceAttribute_t

* Added texture 1D,2D and 3D support for NVIDIA path
2019-07-18 03:18:50 +00:00
Evgeny Mankov b1fad7915b [HIPIFY][bash] Make 'find' sorted by extension (#1231)
+ Source files are the first to go. It is needed for in-place hipification in order to avoid errors with included but already hipified header files.
+ More extensions support for batch processing.
2019-07-17 07:28:54 +00:00
Yaxun (Sam) Liu 2b5ff1678a Add amdgpu targets gfx1010 and gfx1012 (#1211) 2019-07-12 03:13:35 +00:00
Michael LIAO e32940357f [hipcc] Revise include path calculation.
- Once HIP_VDI_HOME is defined but HIP_CLANG_INCLUDE_PATH is not,
  calculate it directly without HIP_CLANG_PATH is defined or not;
  Otherwise, we may leave HIP_CLANG_INCLUDE_PATH undefined, if clang is
  not installed following the official way (so far, HIP-Clang breaks
  that), we may leave HIP_CLANG_INCLUDE_PATH undefined before its uses.
2019-06-14 13:35:00 -04:00
Yaxun Sam Liu 71f6bf4e67 Fix default HIP_VDI_HOME
There is soft link /opt/rocm/bin/.hipVersion, therefore when hipcc is executed
as /opt/rocm/bin/hipcc, it will set HIP_VDI_HOME to /opt/rocm, which is
incorrect. Check ../lib/bitcode instead to identify HIP_VDI_HOME.
2019-05-31 23:58:59 -04:00
Konstantin Pyzhov ee1d0efdf6 Fixed setting HIP_CLANG_PATH on Windows. 2019-05-28 09:38:17 -04:00
Yaxun (Sam) Liu e17f94e080 Fix hipcc for hip-clang. (#1143)
* Fix hipcc for hip-clang.

If there is -g, do not add -O3 by default.
If HIP_VDI_HOME is not set, set HIP_VDI_HOME based on hipcc directory for HIP/VDI runtime.
For HIP/VDI runtime, set HIP_CLANG_PATH and DEVICE_LIB_PATH based on HIP_VDI_HOME only if they exist.

This allows using HIP/VDI runtime with hip-clang installed at /opt/rocm/llvm and device lib installed
at /opt/rocm/lib.

* Fix HIP_VDI_HOME for hipcc called from /opt/rocm/bin
2019-05-28 09:40:34 +05:30
Maneesh Gupta 43e2c9d361 Merge pull request #1136 from yxsamliu/fix-rdc
Fix device lib path for hip-clang.
2019-05-24 14:16:30 +05:30
Yaxun Sam Liu bba85f0e24 Fix device lib path for hip-clang.
We now always need device lib path when compiling and not need it at linking.
2019-05-23 15:11:02 -04:00
Aaron Enye Shi 20ea7e9d26 Fix hipcc exit code when failing 2019-05-16 20:36:58 +00:00
Michael LIAO 7f8b80103d [hipcc] Repace --rpath with --rpath-link
- With `--rpath`, app's RUNPATH is set to the temporary library path
  during build. Instead, `--rpath-link` should be used to leave RUNPATH
  untouched. User should set LD_LIBRARY_PATH or system ld.so.conf to
  proper setting.
2019-04-29 16:01:16 -04:00
Aaron Enye Shi a3d118eaa8 Revert "Use COMgr to read Kernel Args Metadata (#1006)"
This reverts commit 8a548bf40b.
2019-04-26 16:04:56 -04:00
Evgeny Mankov abd1c53cf8 [HIPIFY][perl][fix][258] Memory fence device functions are supported now 2019-04-25 13:27:30 +03:00
Evgeny Mankov defc6f8155 [HIPIFY][hipify-perl] Formatting 2019-04-23 17:55:47 +03:00
Aaron Enye Shi 8a548bf40b Use COMgr to read Kernel Args Metadata (#1006)
* Add CMAKE dep to amd_comgr

* Use COMGR for read_kernarg_metadata in COV2

* Do not assume kernargs exist

* Add proper metadata destroy cleanup

* Use a process function for easier destroy

* Remove old read_kernarg_metadata

* Clean up HCC, prints, names

* Use COMGR in CMAKE by default

* Move metadata lookup for keyword values into helper

* Remove C string usage for lookup_keyword_value

* Guard COMGR for non-NVCC path

* Add hip_hcc dependency on comgr package

* Add lifetime to metadata nodes

* Find COMGR config file for amd_comgr target

* Move set_active data earlier
2019-04-16 08:34:39 +05:30
Yaxun (Sam) Liu a31036ab74 hip-clang: fix hipcc options
Use -O3 for default optimization level.
Fix --hip-device-lib-path for warnings about unused option.
2019-04-09 22:31:13 -04:00
Yaxun (Sam) Liu c0e0ea9a12 hip-clang: add include path for hsa headers 2019-04-09 15:01:50 -04:00
Anthony Cowley e9b1881c60 hipify: translate cudaErrorInvalidSymbol 2019-04-02 08:54:37 -04:00
Yaxun Sam Liu e2bf34cd5e Change HIP dll name to amdhip64.dll on Windows 2019-03-19 16:27:18 -04:00
Maneesh Gupta 2d67bc5e9c Merge pull request #936 from mangupta/swdev-174923
[hipconfig] Update HIP_PLATFORM detection logic
2019-03-06 06:08:11 +05:30
Yaxun Sam Liu e8556388f9 Revert "hipcc should consume -mcode-object-v3 flag"
This reverts commit eb33507774.
2019-02-28 11:21:47 -05:00
Yaxun Sam Liu 1bd8d24278 Revert "Change code-object flag to only HIP-Clang"
This reverts commit 1c6365fbe7.
2019-02-28 11:20:04 -05:00
Yaxun Sam Liu 737972d31c Revert "Consume the code obj args to prevent duplicates"
This reverts commit 2cd34f3c01.
2019-02-28 11:19:35 -05:00