提交線圖

37 次程式碼提交

作者 SHA1 備註 日期
Evgeny Mankov e97beff540 [HIPIFY] Add Channel (Textures) support.
[ROCm/hip commit: b135b24200]
2017-02-16 21:10:10 +03:00
Evgeny Mankov 07ffedbbf3 [HIPIFY] Add Inter-Process Communications (IPC) support.
[ROCm/hip commit: ea95f3166a]
2017-02-16 20:24:53 +03:00
Evgeny Mankov 2951f80caf [HIPIFY] Add CUDA Driver LAUNCH_PARAM defines.
[ROCm/hip commit: bbbe5814c1]
2017-02-16 20:00:36 +03:00
Evgeny Mankov c98017e483 [HIPIFY] Add safe type check for cudaChooseDevice matcher.
[ROCm/hip commit: 93c1e31b36]
2017-02-16 19:38:35 +03:00
Evgeny Mankov 6f5ad4e7e6 [HIPIFY] [Fix] Crash on thrust example fallback_allocator.cu.
https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/65

[Bug]
Access violation in cudaStructVar matcher.

      StringRef name = structVar->getType()
        ->getAsStructureType()
        ->getDecl() // <--- Access Violation
        ->getNameAsString();

[Solution]
Add isStructureType() check before getting type as Struct.

[ToDo]
Find case-studies for that StructVar matcher with types other than Struct.


[ROCm/hip commit: 950434f4af]
2017-02-15 19:48:31 +03:00
Evgeny Mankov 8a8a7bc843 [HIPIFY] Add file:line:col info to [HIPIFY] warnings/errors.
[ROCm/hip commit: e39ed24a50]
2017-02-14 21:36:49 +03:00
Evgeny Mankov ffedb9388f [HIPIFY] Add more unhandled refs for opaque pointers.
CUfunc_st -> hipFunction_t *
CUctx_st -> hipCtx_t *
CUmod_st -> hipModule_t *


[ROCm/hip commit: b3941dd546]
2017-02-14 17:34:10 +03:00
Evgeny Mankov f6483f36a1 [HIPIFY] Fix warnings on unhandled refs.
CUstream_st -> hipStream_t *
CUevent_st -> hipEvent_t * (fixed, was -> hipEvent_t)

Warning:
[HIPIFY] warning: the following reference is not handled: 'CUstream_st' [struct var ptr]. (thrust/examples/cuda/async_reduce.cu)


[ROCm/hip commit: a6db38c337]
2017-02-14 17:23:09 +03:00
Evgeny Mankov af7455bd64 [HIPIFY] Narrow cudaKernelCallExpr matcher.
[Explanation]
Narrow cudaKernelCallExpr matcher to isExpansionInMainFile() - to the file being actually converted (without system includes).
But as for Thrust, there are *.inl files, which are nevertheless being expanded in main file.
These files contain cuda kernel launches, which are not converted successfully by hipify, for instance:
thrust/system/cuda/detail/detail/launch_closure.inl:98:23.

[ToDo]
File a bug on cudaKernelCallExpr matcher for conversion error (thrust\examples\cuda\<any cu example>).


[ROCm/hip commit: d1cfcf55f1]
2017-02-14 16:28:05 +03:00
Evgeny Mankov 31dfd8bb1f [HIPIFY] Minor refactoring
+ insertHipHeaders function is added to Cuda2Hip class;
+ fix replacement ending for hip header.


[ROCm/hip commit: c3ab4d5c5e]
2017-02-13 18:13:49 +03:00
Evgeny Mankov e09697c1cf [HIPIFY] 'CHANGED LOC', 'TOTAL LOC' and 'CODE CHANGED (in lines)' are added to statistics.
[ROCm/hip commit: 751db030c2]
2017-02-10 22:02:41 +03:00
Evgeny Mankov a3cd9893d3 [HIPIFY] Formatting, no functional changes.
[ROCm/hip commit: b7992fa252]
2017-01-13 14:59:15 +03:00
Evgeny Mankov 8e219d3624 [HIPIFY] cudaDataType_t and libraryPropertyType_t support (CUDA 8.0.44 only)
All are marked as HIP_UNSUPPORTED.
IMPORTANT:
1. libraryPropertyType_t has no cuda prefix. => TO_DO: new matcher is needed.
2. all libraries (cublas, cufft, cusolver, cusparse, nvgraph) have started to use these types (since 8.0).


[ROCm/hip commit: 9a0780001b]
2017-01-10 20:24:27 +03:00
Evgeny Mankov 6c943240be [HIPIFY] cudaDeviceAttr (RT API) support up to CUDA 8.0.44
Attributes, which are not yet supported by HIP, are marked as HIP_UNSUPPORTED.


[ROCm/hip commit: 3a99536ed5]
2017-01-10 19:29:33 +03:00
Evgeny Mankov 96640b45e2 [HIPIFY] CUdevice_attribute support up to CUDA 8.0.44
Attributes, which are not yet supported by HIP, are marked as HIP_UNSUPPORTED.


[ROCm/hip commit: 7ed2b163de]
2017-01-10 17:54:22 +03:00
Evgeny Mankov 688d9f459e [HIPIFY] Elapsed time is added to statistics.
[ROCm/hip commit: 14e9cf7e62]
2016-12-28 20:44:05 +03:00
Evgeny Mankov 9d41561ab4 [HIPIFY] Added the rest of cuBlas API.
CUBLAS API 7.5 now is supported by hipify;
API calls, which are not yet supported by hcblas/hipblas, are listed as HIP_UNSUPPORTED.


[ROCm/hip commit: 6ceb85a03a]
2016-12-28 18:08:10 +03:00
Evgeny Mankov 2250218e10 [HIPIFY] Formatting, no functional changes.
[ROCm/hip commit: d7d3fcc77d]
2016-12-27 19:48:59 +03:00
Evgeny Mankov 12bf2e3f73 [HIPIFY] [Fix] An argument of a function used as macro argument is not hipified.
https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/35


[ROCm/hip commit: 5ec0488ce8]
2016-12-27 18:54:02 +03:00
Evgeny Mankov 154576f772 [HIPIFY] Pointer to typedef declaration is not hipified
Fix for https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/60


[ROCm/hip commit: 24703944de]
2016-12-26 19:03:50 +03:00
Evgeny Mankov d2cf5ba147 [HIPIFY] Fix line endings.
[ROCm/hip commit: ab00e2a627]
2016-12-23 18:01:26 +03:00
Evgeny Mankov d152a89e79 [HIPIFY] Stats: Calculation of changed code amount, based on actually replaced bytes.
+ REPLACED bytes, TOTAL bytes & CODE CHANGED are added to statistics.
+ -o-stats option for specifying the file with statistic.


[ROCm/hip commit: 6882057fd2]
2016-12-23 17:40:06 +03:00
Evgeny Mankov 0215c67ba6 [HIPIFY] Statistics in CSV file.
+ Stats by CUDA ref name.
+ Conversion %.

TODO: Calculation of changed code amount, based on actually replaced bytes.


[ROCm/hip commit: 4bb8bf8dab]
2016-12-21 23:08:01 +03:00
Evgeny Mankov 121b909f55 [HIPIFY] Reflect unsupported CUDA API refs in statistics
https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/53

+ Unsupported refs (by HIP) are now might be listed along with the supported ones.
+ Warnings are added for the unhandled (by HIPIFY) refs, for instance:
  "warning: the following reference is not handled: 'cublasContext' [param decl ptr]."
+ Reflect unsupported CUDA API refs in statistics.
+ Occupancy API [HIP_UNSUPPORTED].
+ A few CUBLAS refs are listed as HIP_UNSUPPORTED.

TODO: Statistics in CSV file.


[ROCm/hip commit: 3dd32e969d]
2016-12-19 14:38:19 +03:00
Evgeny Mankov e29cc18289 [HIPIFY] nested macro is not hipified, when it isAnyIdentifier
Fix for https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/55


[ROCm/hip commit: 2383d9bc1a]
2016-12-15 21:00:34 +03:00
Evgeny Mankov 4fd6a82aaf [HIPIFY] Code refactoring and total stat collecting
+ Single base class for Preprocessor and MatchFinder classes.
+ Total Stats for multiple files is added.


[ROCm/hip commit: ad3ec15d85]
2016-12-13 18:01:08 +03:00
Evgeny Mankov b2377f20ba [HIPIFY] Rename -n to -examine
[ROCm/hip commit: 95ae514511]
2016-12-12 20:03:01 +03:00
Evgeny Mankov a5ded34092 [HIPIFY] Multiple source files support.
[ROCm/hip commit: 02468d31fc]
2016-12-12 19:57:19 +03:00
Evgeny Mankov 0ec50d179c [HIPIFY] -no-backup option is added.
Is useful for release hipifying in place.


[ROCm/hip commit: 428a1bc79f]
2016-12-08 23:14:19 +03:00
Evgeny Mankov d773facac2 [HIPIFY] -no-output support.
Actually output file is created by clang itself, but isn't updated and is deleted after processing.
In cooperation with -print-stat -no-output (or single -n) is used for examine the source CUDA code.

Conflicting options:
-inplce
-o


[ROCm/hip commit: 2374153c10]
2016-12-08 22:45:10 +03:00
Evgeny Mankov 70a6fee7ef Fix the limitation of supported input files.
Actually .cu and .cuda was supported.

+ All the file names are allowed, including file names without extension.

[IMPORTANT]
To hipify CUDA input file, which name is not *.cu, please add option "-x cuda" after tool's options ending marker "--", for instance:

./hipify-clang NeuralNet -- -x cuda

This option will go to clang itself, not the hipify tool.


[ROCm/hip commit: 23bbe6e467]
2016-12-08 20:28:43 +03:00
Evgeny Mankov 0fd5ec74c0 [HIPIFY] wrap kernel name with HIP_KERNEL_NAME macros...
only in case of commas in it.


[ROCm/hip commit: 1b64c167f6]
2016-10-28 20:05:51 +03:00
Evgeny Mankov 4b907cce25 * [HIPIFY] Initial Profiler support.
CUDA Driver API porting to HIP:

+ cuProfilerStart, cuProfilerStop.
- cuProfilerInitialize & cudaProfilerInitialize - unsupported yet by HIP.


[ROCm/hip commit: b0f37d0d2e]
2016-10-28 18:32:13 +03:00
Evgeny Mankov 638b1b14a9 [HIPIFY] Fix typo in option's help description
[ROCm/hip commit: d464c8010b]
2016-10-20 18:57:52 +03:00
Evgeny Mankov cf6bcd1b0e [HIPIFY] Add missing options to tool's -help
Also HelpMessage with a description of the common command-line options related to the compilation database and input files is added.


[ROCm/hip commit: dae4b060bd]
2016-10-20 18:29:24 +03:00
Evgeny Mankov cc61406070 [HIPIFY] Initial support of CUDA Limits.
[ROCm/hip commit: 2faa63c2d8]
2016-10-13 23:32:52 +03:00
Maneesh Gupta 0e3a0bdd1f clang-hipify -> hipify-clang. Also attempt to build it by default
Change-Id: I694e6c772f5347c820d9bd6c9aa61d6d9696911e


[ROCm/hip commit: 798d4be080]
2016-10-05 13:06:22 +05:30