Граф коммитов

201 Коммитов

Автор SHA1 Сообщение Дата
Evgeny Mankov 467f9a5e89 [HIPIFY][DNN] cuDNN support revise
+ add doc for CUDDN API supported by HIP
+ cuDNN softMax test


[ROCm/hip commit: 7ef05de0d5]
2018-07-20 21:00:24 +03:00
Evgeny Mankov b063b3eb26 [HIPIFY] Support of cudaComputeMode / CUcomputemode
+ update docs
+ fix typo in hip_runtime_api.h


[ROCm/hip commit: 55e21055e3]
2018-07-14 16:08:19 +03:00
Evgeny Mankov 51fff4049a [HIPIFY] Current trunk LLVM 7.0 initial support
Tested with CUDA 8.0, 9.0, 9.1 and 9.2.

Only 8.0 works with LLVM 7.0, due to the changes in LLVM trunc since released 6.0, which works fine with CUDA 8.0 and 9.0.

So, nothing to do in hipify-clang, hope that all the CUDA 9.x related issues will be fixed in 7.0 release.


[ROCm/hip commit: 433e172776]
2018-07-11 20:15:49 +03:00
Evgeny Mankov 2c8fbf1a67 [HIPIFY] Add DEBUG(X) macro compatibility
In LLVM 7.0 DEBUG(X) was deleted, LLVM_DEBUG(X) should be used instead.


[ROCm/hip commit: 9fcb48e5c4]
2018-07-11 18:21:00 +03:00
Evgeny Mankov 5a6fe18e0d [HIPIFY][docs] Update README.md after testing with new LLVM releases 5.0.2 and 6.0.1
[ROCm/hip commit: 75164a5bf5]
2018-07-10 20:37:54 +03:00
Evgeny Mankov a63f8510b0 [HIPIFY][DNN] support of cuDNN 7.1.3 - finishing
[ROCm/hip commit: a5df3a484c]
2018-05-21 18:31:20 +03:00
Evgeny Mankov 3d792501c6 [HIPIFY][DNN] support of cuDNN 7.1.3 - continuation 2
- not finished yet.
- based on https://github.com/ROCmSoftwarePlatform/hipDNN.
- testing on https://github.com/baidu-research/DeepBench - almost pass, except cusparse (not supported yet).
- started testing of examples from libcudnn7-dev_7.1.3.16-1+cuda8.0_amd64 package.


[ROCm/hip commit: b0fd0c310d]
2018-05-14 16:23:59 +03:00
Evgeny Mankov 3ff6d4c311 [HIPIFY][DNN] support of cuDNN 7.1.3 - continuation
- not finished yet.
- based on https://github.com/ROCmSoftwarePlatform/hipDNN.
- testing on https://github.com/baidu-research/DeepBench.


[ROCm/hip commit: dffe1802be]
2018-05-10 17:36:51 +03:00
Evgeny Mankov 44007e29ab [HIPIFY][Blas] Sync with CUDA 9.1
[ROCm/hip commit: e5ba9668fc]
2018-05-08 20:42:30 +03:00
Evgeny Mankov ef30e4601e [HIPIFY] Sync with hipBLAS
[ROCm/hip commit: 7681775662]
2018-05-08 19:20:47 +03:00
Evgeny Mankov 61d95e4b42 [HIPIFY][doc] Readme.md update
+ supported CUDA version to LLVM version correspondence table is added.
+ Test section is rewritten.
+ Windows support is added.


[ROCm/hip commit: 054c3f71f0]
2018-05-04 10:50:18 +03:00
Evgeny Mankov 057b13fc4a [HIPIFY] Initial cuDNN support
- based on https://github.com/ROCmSoftwarePlatform/hipDNN.
- lit testing was supplemented with CUDA_DNN_ROOT_DIR for cuDNN testing.
- single cuDNN test was added.


[ROCm/hip commit: fe421c89b2]
2018-05-03 11:33:40 +03:00
Evgeny Mankov 6b53512635 [HIPIFY] Sync with HIP (Execution Control, Surfaces, Memory)
Execution Control [deprecated since 7.0]:
cudaConfigureCall -> hipConfigureCall
cudaLaunch -> hipLaunchByPtr
cudaSetupArgument -> hipSetupArgument

Surfaces (partially):
cudaSurfaceObject_t -> hipSurfaceObject_t
cudaSurfaceBoundaryMode -> hipSurfaceBoundaryMode
cudaCreateSurfaceObject -> hipCreateSurfaceObject
cudaDestroySurfaceObject -> hipDestroySurfaceObject

Memory Management:
cudaMemset2DAsync -> hipMemset2DAsync


[ROCm/hip commit: 6f501f6094]
2018-04-24 22:04:04 +03:00
Evgeny Mankov 540fc92b1c [HIPIFY] undo apply .clangformat to HIPIFY source files
[ROCm/hip commit: 8499e79e2b]
2018-04-23 20:22:15 +03:00
Maneesh Gupta 4f42ee762d Apply .clangformat to all repo source files
Change-Id: I7e79c6058f0303f9a98911e3b7dd2e8596079344


[ROCm/hip commit: 1ba06f63c4]
2018-03-12 11:29:03 +05:30
Evgeny Mankov 1b25dfa25c [HIPIFY][fix] Build against llvm 3.8.0 fixed - missing include
/srv/HIP/hipify-clang/src/main.cpp:134:19: error: no member named 'dbgs' in namespace 'llvm'
      DEBUG(llvm::dbgs() << "Skipped some replacements.\n");
            ~~~~~~^


[ROCm/hip commit: 7f3e89bbb0]
2018-02-08 00:08:47 +03:00
Evgeny Mankov 934c34e81f [HIPIFY][tests] add poisson-api-example test
+ add missing types
+ doc update


[ROCm/hip commit: 26095fe7c1]
2018-01-30 19:50:18 +03:00
Evgeny Mankov 58d1f6f3b3 [HIPIFY][tests] fix typo
[ROCm/hip commit: 9d814bef31]
2018-01-30 18:55:09 +03:00
Evgeny Mankov e455192444 [HIPIFY] InclusionDirective refactoring
Due to support of cuRAND headers.

+ compound test on all headers is added;
+ missing entities are added with updating the doc;
+ a couple cuRAND tests are added (https://github.com/ROCmSoftwarePlatform/rocRAND/tree/master/benchmark):
  - the following CUDA entities are still unsupported by hipRAND:
      curandMakeMTGP32Constants
      curandMakeMTGP32KernelState
      curandGetDirectionVectors32
      curandDirectionVectorSet_t
      CURAND_DIRECTION_VECTORS_32_JOEKUO6
      curandStateSobol64_t
      curandStateScrambledSobol64_t
      curandGenerateLongLong
  - and the following - by HIP:
      cudaRuntimeGetVersion
  - those entities are handled by CHECK-NOT directive for now.


[ROCm/hip commit: 02e23c4d87]
2018-01-29 18:33:47 +03:00
Evgeny Mankov 496111adc3 Merge pull request #340 from emankov/master
[HIPIFY][fix] Fix PragmaDirective

[ROCm/hip commit: fb1012a4b8]
2018-01-24 18:09:54 +03:00
Evgeny Mankov 369f3aa9fa [HIPIFY][fix] CUDA and cuBLAS main headers correct handling
[ROCm/hip commit: 600d5d7c06]
2018-01-23 23:43:36 +03:00
Evgeny Mankov fda3893ee3 [HIPIFY][fix] Fix PragmaDirective
File location have to be verified, otherwise location of the first found '#pragma once' in any included header even system will be erroneously handled, which might lead to attempt to including hip_runtime.h in it.


[ROCm/hip commit: 77f807b597]
2018-01-23 23:06:55 +03:00
Evgeny Mankov 13aa621ce4 [HIPIFY] Sync with hipBLAS ToT and CUDA cuBLAS 9.1
[ROCm/hip commit: ddfb110080]
2018-01-22 17:12:02 +03:00
Evgeny Mankov 562844d378 [HIPIFY] cuRAND lib support (Device)
[ROCm/hip commit: 6e000adde4]
2018-01-19 21:29:05 +03:00
Evgeny Mankov 4d1fcf52e3 [HIPIFY] cuRAND lib support (partial - only Host)
[ROCm/hip commit: 8ff99eeadc]
2018-01-19 17:38:51 +03:00
Evgeny Mankov 5b9b271506 Merge pull request #332 from emankov/cudaMap_2
[HIPIFY] Add cudaMalloc3D support

[ROCm/hip commit: 0f7d687271]
2018-01-18 13:05:57 +03:00
Evgeny Mankov 7b7560f95d [HIPIFY] Add cudaMalloc3D support
[ROCm/hip commit: ff5f964c07]
2018-01-18 12:28:56 +03:00
Evgeny Mankov dad19d57f4 [HIPIFY] Add CUDA Driver API Texture Ref support (partial)
[ROCm/hip commit: 5788ac5d37]
2018-01-18 12:03:03 +03:00
Evgeny Mankov c52681edf2 [HIPIFY] Add more supported by HIP CUDA Driver API Arrays data types and functions
[ROCm/hip commit: 478fed74fe]
2018-01-16 21:07:50 +03:00
Evgeny Mankov 1506ec0d75 Merge pull request #319 from emankov/issue_211
[HIPIFY][fix][#211] Algorithm for explicit insert of hip include directive

[ROCm/hip commit: 88c5ffee3a]
2018-01-16 19:47:15 +03:00
Evgeny Mankov d5821de893 [HIPIFY] Add more supported by HIP CUDA RT API Textures and Arrays data types
[ROCm/hip commit: eb61038736]
2018-01-16 17:21:19 +03:00
Evgeny Mankov e09ba44b16 Update HipifyAction.cpp
dead code eliminate

[ROCm/hip commit: e54d9f3df0]
2018-01-16 15:08:08 +03:00
Evgeny Mankov 0e8da085bf [HIPIFY][fix][#211] Algorithm for explicit insert of hip include directive
If in source CUDA file main header (cuda_runtime.h or cuda.h) is not presented, corresponding HIP main header (hip_runtime.h) should be explicitly included in output hipified file.

[Algorithm]
1. If #pragma once is presented, HIP main header should be placed just after it;
2. Otherwise if any other (not CUDA main) header is presented, HIP main header should be placed just before it;
3. Otherwise HIP main header should be placed in the beginning of output file.

P.S.
There might be one more situation when #ifndef #define ... #endif guard for the entire file is presented (make sense for *.h, *.hpp, *.cuh files). In this case HIP main include should be placed just after such #ifdef, or after #pragma once, if it is also presented. This situation will be handled in a separate change.


[ROCm/hip commit: 09655a0853]
2018-01-15 21:05:05 +03:00
emankov 16d792681a [HIPIFY][#311][fix] Get rid of socat in run_test.sh
[ROCm/hip commit: 6500cce6aa]
2018-01-15 14:20:37 +03:00
Evgeny Mankov ef06c37924 [HIPIFY][cmake] Version compatibility checks of CUDA and clang are added
[ROCm/hip commit: caf6b5c4f0]
2018-01-12 17:36:41 +03:00
Evgeny Mankov 04bc4d4481 Merge pull request #307 from emankov/issue_306
[HIPIFY][FIX][#306] Eliminate second cuda main include directive

[ROCm/hip commit: f19cb9995e]
2018-01-10 22:50:44 +03:00
Evgeny Mankov 217d7031a4 [HIPIFY][fix][#306] Code improve
[ROCm/hip commit: 08662fba73]
2018-01-10 21:26:05 +03:00
Evgeny Mankov fd09c0eea8 [HIPIFY][#308][fix] Consume error returned by Replacements::add(...)
[ROCm/hip commit: 3f6de8bb10]
2018-01-09 20:03:53 +03:00
Evgeny Mankov 263cacc1c2 [HIPIFY][FIX][#306] Eliminate second cuda main include directive
// hipified to #include<hip/hip_runtime.h>
#include<cuda.h> // 1st cuda main include (Driver API)
// to eliminate
#include<cuda_runtime.h> // 2nd cuda main include (Runtime API)

HIP has one header hip_runtime.h for both CUDA APIs, thus second cuda main include directive is eliminated entirely.


[ROCm/hip commit: 7e7cfa10cc]
2017-12-26 20:54:54 +03:00
Evgeny Mankov 3f9d032f69 [HIPIFY][cmake] Fix require_program function
Function require_program erroneously doesn't report "Can't find program" on any missing program except the first one due to the cached FOUND_PROGRAM value.

Additionally:
+ Do not throw FATAL_ERROR on missing program in order to obtain the whole list of missing programs (if any).
+ Report also found program location.


[ROCm/hip commit: 56bffb5999]
2017-12-18 19:57:04 +03:00
Evgeny Mankov 3233d633da [HIPIFY] Remove cudaBuiltin matcher
[ROCm/hip commit: 5d92a6c252]
2017-12-06 20:22:14 +03:00
Evgeny Mankov eefead5a1c [HIPIFY] Disable cudaBuiltin matcher.
As HIP has started to support vanilla CUDA syntax for threadIdx, blockIdx, blockDim and gridDim.
Other CUDA builtins are not tracked for now.


[ROCm/hip commit: 71d2fb20c8]
2017-12-05 20:28:51 +03:00
Evgeny Mankov af07df0b85 [HIPIFY] remove duplicates from CUDA_IDENTIFIER_MAP
[ROCm/hip commit: f24dfc6f36]
2017-12-05 19:46:53 +03:00
Evgeny Mankov 499e247586 Merge pull request #262 from ChrisKitching/frontendaction
[HIPIFY] Mostly fix preprocessor-or-template induced issues

[ROCm/hip commit: aa05b3d84e]
2017-11-27 17:30:11 +03:00
Chris Kitching 096136750c Use proper clang diagnostics for printing warnings
Much pretty. Very wow

This gives users all the usual power when it comes to manipulating
clang diagnostics. People can pass -Werror can have hipify fail if
it doesn't completely translate a file, for example. Much nicer
than reinventing the wheel.


[ROCm/hip commit: 6b767a59ba]
2017-11-13 20:58:55 +00:00
Chris Kitching 78cf713140 Use a custom FrontendAction to simplify identifier translation
Most of what hipify does is really just replacing CUDA idenitifers
with HIP ones. CUDA function calls, preprocessor macro calls,
enum references, types, etc.

This is problematic: calls/types/enum-refs require name resolution
for the AST matcher to work. This fails in the presence of code
deleted by the preprocessor, and in two-pass template compilation.

Instead, we can simply hook the lexer and have it rewrite the
identifiers for us.

This approach means identifier transformations will work correctly
regardless of where they appear (and we get to delete lots of code)

- Fixes #260
- Helps a bit with #207 - it will still fail to translate kernel
calls in preprocessor-ignored code, but everything except kerel
launches should translate correctly now, even in
preprocessor-deleted code.


[ROCm/hip commit: 24cdc5e1d3]
2017-11-13 20:58:54 +00:00
Chris Kitching c2d54f0154 Add hipify mappings for all CUDA headers that have HIP equivalents
I'm particularly running into issues with `device_types.h` in real
CUDA code...


[ROCm/hip commit: 23b5d26582]
2017-11-13 17:20:07 +00:00
Evgeny Mankov 27c5e94c81 [HIPIFY] fix typo - missing )
[ROCm/hip commit: 44c74b6511]
2017-10-27 23:31:43 +03:00
Evgeny Mankov b9a52020b2 Merge pull request #238 from ChrisKitching/statistics
[HIPIFY] Decouple the statistics system from the code rewriter

[ROCm/hip commit: b28a69785b]
2017-10-27 23:17:20 +03:00
Evgeny Mankov 193235bd08 Merge pull request #236 from ChrisKitching/friendlyCmake
[HIPIFY] Make the cmake build system more friendly

[ROCm/hip commit: c9b7c43e1c]
2017-10-27 22:35:13 +03:00