Commit Graph

2949 Commits

Author SHA1 Message Date
Evgeny Mankov aa02bb3ecb Merge pull request #861 from emankov/master
[HIPIFY][cmake] Add header files to the project explicitly

[ROCm/clr commit: a075eb8658]
2019-01-11 16:45:32 +03:00
Maneesh Gupta c556d2f2cb Merge pull request #858 from lmoriche/Windows
Fix compilation issues with MSVC

[ROCm/clr commit: 7def56e23e]
2019-01-11 12:36:07 +05:30
Maneesh Gupta a60c85b353 Merge pull request #857 from ROCm-Developer-Tools/feature_ensure_lazy_init_initialises
Ensure that static structures are populated

[ROCm/clr commit: bc2f51a86f]
2019-01-11 12:35:52 +05:30
Maneesh Gupta 73fb88e87a Merge pull request #859 from LucasCampos/README-typo
Fix typo in README.md

[ROCm/clr commit: 6320a98498]
2019-01-11 07:54:19 +05:30
Evgeny Mankov ea1c394060 [HIPIFY][cmake] Add header files to the project explicitly
[ROCm/clr commit: b053cc0a21]
2019-01-10 19:45:43 +03:00
Evgeny Mankov c8d061ed14 [HIPIFY] Introduce '--' option - a separator between hipify-clang and clang options
+ Append '--' to the end of hipify-clang options in case of its absence.

[Reason]
+ Avoid the necessity for the user in JSON compilation database specification.
  Otherwise:
  Error while trying to load a compilation database:
  Could not auto-detect compilation database for file "test.cu"

  Though the hipification will be performed correctly without JSON database.


[ROCm/clr commit: 63b7fc5714]
2019-01-10 18:27:30 +03:00
Evgeny Mankov 175c294553 [HIPIFY] option cuda-path might be used with '--' as well as with a single dash: '-'
+ Update README.md


[ROCm/clr commit: 9b6af0a81d]
2019-01-10 18:01:33 +03:00
Lucas Campos ded3323a65 Fix typo in README.md
[ROCm/clr commit: ae4c2ee64c]
2019-01-10 09:45:23 +01:00
Laurent Morichetti c292915466 Fix compilation issues with MSVC
[ROCm/clr commit: 167bbffc4f]
2019-01-09 09:32:50 -08:00
Alex Voicu 47b142ad3b Ensure that static structures are populated
[ROCm/clr commit: 1c815170da]
2019-01-09 17:21:53 +00:00
Evgeny Mankov 7d81558657 [HIPIFY] Introduce CUDA installation path option '-cuda-path'
Repeats clang's '--cuda-path' option.

[Reason]
In case of absence of any other clang's options setting '-cuda-path' allows not to specify separator '--' before clang's '--cuda-path'.

+ Tests and scripts are updated accordingly.


[ROCm/clr commit: c4268855e3]
2019-01-09 20:18:36 +03:00
Evgeny Mankov d424128b31 [HIPIFY][cmake][win] Add cmake versioning depending on Visual Studio version
[ROCm/clr commit: 558894ab06]
2019-01-09 16:44:12 +03:00
Evgeny Mankov 587969c10e Merge branch 'master' of https://github.com/ROCm-Developer-Tools/HIP
[ROCm/clr commit: 5dba4e74cb]
2019-01-09 14:03:40 +03:00
Evgeny Mankov eb42f06a52 [HIPIFY][cmake] Add cmake versioning depending on CUDA version
[ROCm/clr commit: d160c7285c]
2019-01-09 13:59:48 +03:00
Wen-Heng (Jack) Chung 2f64c76789 Introduce hash key to HIP module implementation
A hash calculated via FNV-1a algorithm is introduced in ihipModule_t, the
internal of hipModule_t. The hash is used by HIP module APIs such as

- read_agent_global_from_module

to determine whether the agent-scope globals for a module have been iterated.

This commit fixes one issue that applications which load / unload modules
frequently would occasionally fail. After deep investigation of the issue it
turns out the old implementation in read_agent_global_from_module uses
hipModule_t as the key, which is not robust enough, as hipModule_t instances
are allocated dynamically so there are cases that one memory address may be
used by multiple hipModule_t instances. The real solution is to introduce a
uniquely identifiable hash for the code object associated with the HIP module.
And that's the rationale behind this commit.


[ROCm/clr commit: 6e68d44220]
2019-01-08 17:33:40 +00:00
Maneesh Gupta d41c852742 Merge pull request #845 from mangupta/cleanup-install-markdown
Update INSTALL.md

[ROCm/clr commit: cf7dc26851]
2019-01-07 10:04:36 +05:30
Maneesh Gupta 7b45721b1b Merge pull request #701 from ssahasra/stream-tests
introduce tests for asynchronous streams

[ROCm/clr commit: 03e1058666]
2019-01-07 10:04:29 +05:30
Maneesh Gupta e7195f7dc2 Update hipAsynchronousStreams.cpp
This test needs to be excluded from nvcc platform

[ROCm/clr commit: 79251fc4e2]
2019-01-07 09:26:21 +05:30
emankov 5f15b656e0 [HIPIFY][fix][#851] make_absolute only in case of relative path
Otherwise return the input path.


[ROCm/clr commit: 61593291fd]
2019-01-06 17:58:37 +03:00
emankov 32711768a4 [HIPIFY][fix][#849] Create temporary file based on source file name only
[ROCm/clr commit: 50ba722a2d]
2019-01-05 14:52:15 +03:00
emankov beab4005b1 [HIPIFY][cmake] Change min supported version of cmake to 3.12.3
[Reason]
CUDA 10 is supported by cmake since 3.12.3.


[ROCm/clr commit: 728fb14ab9]
2019-01-04 19:10:11 +03:00
emankov bfd355c8eb [HIPIFY][cmake][win] check for Visual Studio version
hipify-clang could be built by Visual Studio 14 2015 or higher.

[Reason]
hipify-clang contains c++14 features which are not supported even by the latest VS 2013 and the Platform Toolset "Visual C++ Compiler Nov 2013 CTP".


[ROCm/clr commit: 207bbad778]
2019-01-04 18:52:28 +03:00
Sameer Sahasrabuddhe 0a99432a01 introduce test for asynchronous streams
This test is identical to the HCC tests under
tests/Unit/OCKL/AsyncStreams, but only for synchronous operation.


[ROCm/clr commit: 39574dba4c]
2019-01-04 05:51:50 -05:00
Maneesh Gupta 9c8a2c36fa Update INSTALL.md
- Improved install instructions for AMD-hcc and NVIDIA-nvcc.
- Removed redundant section related to HCC-Native-GCN-ISA.

Change-Id: I33a9e71d95df51dbdcade4a48834840146bdbe6f


[ROCm/clr commit: 92a556c20a]
2019-01-04 11:04:47 +05:30
emankov 0207ebf990 [HIPIFY][tests] CUDA 7.0 is also supported
+ Exclude 1 test for CUDA 7.0
+ Update README.md


[ROCm/clr commit: 9808b22864]
2019-01-04 01:32:30 +03:00
emankov e8d2dab718 [HIPIFY][tests] Exclude CUDA 8.0 (9.0) tests if CUDA < 8.0 (9.0)
[ROCm/clr commit: 852bc8d545]
2019-01-03 18:06:49 +03:00
emankov 18ce5086c5 [HIPIFY][tests] Reduce cudaRegister.cu test
[ROCm/clr commit: 410f8f0b92]
2019-01-03 17:17:21 +03:00
Alex Voicu cfed8191f1 Hook into the creaky lazy-reinit machinery. Try to minimise race-risk.
[ROCm/clr commit: 3470692998]
2019-01-01 11:01:16 +05:30
Alex Voicu 6e61270569 More blobs, more problems.
[ROCm/clr commit: b2f76123b1]
2019-01-01 11:01:07 +05:30
Alex Voicu eebc544c62 Start re-working 731 for 2.0.
[ROCm/clr commit: 3e8f198b58]
2019-01-01 11:00:57 +05:30
Maneesh Gupta 5b8b5b842b Merge pull request #818 from yxsamliu/fix-hip-config
Add default arguments for hipConfigureCall

[ROCm/clr commit: aa932d542a]
2019-01-01 10:25:25 +05:30
Yaxun Sam Liu b2d9783c2f Use __dparm for default parameter
[ROCm/clr commit: 57d1f6e6cb]
2018-12-31 13:07:19 -05:00
Maneesh Gupta 389ef21eca Merge pull request #821 from gargrahul/remove_redundancy_memset3d_test
[dtest] Remove redundant arguments from hipMemset3D test

[ROCm/clr commit: 7647bdb664]
2018-12-31 15:32:19 +05:30
emankov a8a2395057 [HIPIFY][fix] Change system includes order
'include/cuda_wrappers' should go first.


[ROCm/clr commit: 158b358c5b]
2018-12-29 22:10:00 +03:00
emankov 4c5a332edc [HIPIFY] Add system includes for packaged hipify-clang to use it without the necessity of installing clang
Header files in those dirs are an integral part of clang, which includes wrapper headers for CUDA.
There is no need in checking those dirs.

[Reasons]
1. clang will not take into account empty or irrelevant include dirs;
2. Packages for different clang versions will have different header files in the above dirs.


[ROCm/clr commit: e9589e3330]
2018-12-29 21:53:18 +03:00
emankov 170add36d8 [HIPIFY] Get rid of setting '--cuda-gpu-arch='
[Reasons]
+ We don't compile kernel code at least for now as HIP kernel syntax is almost equal CUDA's;
+ clang always includes PTX in its binaries, so e.g. a binary compiled with --cuda-gpu-arch= would be forwards-compatible with e.g. sm_35 GPUs.


[ROCm/clr commit: 6f6228cf36]
2018-12-29 19:48:28 +03:00
emankov 843f936503 [HIPIFY] Starts implicitly setting '-x cuda' by hipify-clang itself
+ No need in setting '-x cuda' for the user anymore;
+ Testing and Readme updated accordingly.


[ROCm/clr commit: cea1e5a1a6]
2018-12-29 17:04:59 +03:00
emankov 1e3c49e8f2 [HIPIFY][win] Set -std=c++14 if MSVC
+ Due to latest Windows SDK implementation based on c++14 features, '-std+c++14' is a must;
+ Doesn't affect older versions of MSVC 2017, 2015 (the latest supported is MSVC 2015);
+ On linux still '-std=c++11' is a must;
+ Exclude '-std=' from lit config.


[ROCm/clr commit: b24e89b40f]
2018-12-29 15:51:06 +03:00
Evgeny Mankov 35bc69677a Merge pull request #834 from emankov/master
[HIPIFY] LLVM compatibility

[ROCm/clr commit: 323e22e5fc]
2018-12-28 15:13:36 +03:00
Maneesh Gupta 78235295f6 [ci] Remove ROCm 1.9.x from test infrastructure
Change-Id: I58cce7c60f6def22f337bbe15fab2620419e202b


[ROCm/clr commit: 61e0546120]
2018-12-28 11:23:52 +05:30
emankov 725f821629 [HIPIFY] LLVM compatibility
+ sys::fs::make_absolute fro LLVM < 5.0
+ sys::fs::real_path for LLVM >= 5.0


[ROCm/clr commit: 723c58afa4]
2018-12-28 01:34:35 +03:00
emankov 1ff4bf47c6 [HIPIFY] Use sys::fs::createTemporaryFile without file creation
[Reasons]
+ File is opened further by clang
+ There is a regression with LLVM 5.x, when system error occurs: temporary file couldn't be renamed - permission denied.


[ROCm/clr commit: 8f415def6f]
2018-12-27 17:00:18 +03:00
Maneesh Gupta 0a9a2d030b Merge pull request #817 from aaronenyeshi/fix-rn-intrinsics
Add *_rn functions back into HIP intrinsics

[ROCm/clr commit: 274db66ff2]
2018-12-27 16:07:27 +05:30
emankov c65d6a9e7a [HIPIFY] Introduce option -o-dir
Option -o-dir for output directory:
  + if not specified source file(s) directory is used;
  + creates the directory if the directory doesn't exist (only one level in a tree);
  + if -o and -o-dir both are specified the hipified file is placed to "-o-dir" + "-o";
  + reports an error in case of a wrong directory specified, in case of necessity of creating a tree of subfolders, or in case of a filename specified.


[ROCm/clr commit: c65338fbf7]
2018-12-26 16:30:41 +03:00
emankov 0056b8ad20 [HIPIFY][#812] Finishing with temps
1. Option -temp-dir for temporary directory:
  + if not specified system temp is used;
  + creates the directory if the directory doesn't exist (only one level in a tree);
  + reports an error in case of a wrong directory specified, in case of necessity of creating a tree of subfolders, or in case of a filename specified.
2. Option -save-temps for preserving temporary files:
  + if specified temporary files are not being deleted from system temps and user temps as well.
3. Work with files in terms of calculated absolute paths by collapsing all '.' and '..' patterns, resolving symlinks and expanding '~' expression to the user's home directory:
  + to produce correct include paths;
  + to avoid possible errors on file routines.


[ROCm/clr commit: 7cac7dbfea]
2018-12-22 00:47:19 +03:00
emankov 369ac7b6f5 [HIPIFY][fix][#824] Fix the bug with -inplace option
+ Do temp file copying instead of renaming
+ Replace all file routine functions with LLVM's
+ Do not output hipified file in case of errors


[ROCm/clr commit: cb598445f5]
2018-12-20 20:43:50 +03:00
emankov 7d9eaec992 [HIPIFY] Add the legal right comment to all the sources
[ROCm/clr commit: 340550cc56]
2018-12-20 18:47:57 +03:00
Rahul Garg 489f3ef7ba Remove redundant arguments from hipMemset3D test
[ROCm/clr commit: 10d2a9a269]
2018-12-20 06:51:22 +05:30
Yaxun Sam Liu 51702bed29 Add default arguments for hipConfigureCall
[ROCm/clr commit: 02deeadaa4]
2018-12-18 15:48:21 -05:00
Aaron Enye Shi 56262f0970 Add *_rn functions back into HIP intrinsics
Add back the round-to-nearest-even intrinsics back to HIP math
intrinsics as it caused regression.


[ROCm/clr commit: 2d50392c17]
2018-12-18 19:31:54 +00:00