Commit graph

16 Commits

Autor SHA1 Nachricht Datum
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 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 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 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
Chris Kitching 48e7403762 Remove CUDA_EXCLUDES
An artefact from a now-defunct hack to avoid corrupting programs


[ROCm/hip commit: c6707ef33c]
2017-10-27 20:12:32 +01:00
Chris Kitching 22e7c4ebfc Split the giant lookup table into 3 smaller ones
Instead of having a single, enormous LUT for all CUDA names, let's
have separate ones for different types of entity. We often know
that we're looking at a typename, or a function name, or a macro
name - so we can be more efficient (and resilient to name
collisions) by having smaller lookup tables for each of those
classes of entity).

Here we start that off by having three LUTs:
- Header names
- Type names
- Everything else

Future work could usefully split "everything else" into:
- enum values
- macro names
- function names
- everything else

It's worth noting that the "needs new matcher" todos I delete here
were actually resolved with the previous commit. It no longer
naively searches for things that start with "cu*" - it will find
exactly those things that are present in our lookup tables.


[ROCm/hip commit: 695a1eb059]
2017-10-24 20:38:49 +01:00
Chris Kitching 9eff10c00d Move giant lookup table into another translation unit
Also, rewrote it as a constant variable instead of a function
that imperatively fills a map. It's shorter, faster the compile,
and (depending on how badly the compiler screws it up) maybe
faster to run.

And, of course, it starts breaking up that giant .cpp file.


[ROCm/hip commit: 4ab29113a1]
2017-10-24 20:38:25 +01:00