Graf commitů

16 Commity

Autor SHA1 Zpráva Datum
Evgeny Mankov ddfb110080 [HIPIFY] Sync with hipBLAS ToT and CUDA cuBLAS 9.1 2018-01-22 17:12:02 +03:00
Evgeny Mankov 6e000adde4 [HIPIFY] cuRAND lib support (Device) 2018-01-19 21:29:05 +03:00
Evgeny Mankov 8ff99eeadc [HIPIFY] cuRAND lib support (partial - only Host) 2018-01-19 17:38:51 +03:00
Evgeny Mankov 0f7d687271 Merge pull request #332 from emankov/cudaMap_2
[HIPIFY] Add cudaMalloc3D support
2018-01-18 13:05:57 +03:00
Evgeny Mankov ff5f964c07 [HIPIFY] Add cudaMalloc3D support 2018-01-18 12:28:56 +03:00
Evgeny Mankov 5788ac5d37 [HIPIFY] Add CUDA Driver API Texture Ref support (partial) 2018-01-18 12:03:03 +03:00
Evgeny Mankov 478fed74fe [HIPIFY] Add more supported by HIP CUDA Driver API Arrays data types and functions 2018-01-16 21:07:50 +03:00
Evgeny Mankov eb61038736 [HIPIFY] Add more supported by HIP CUDA RT API Textures and Arrays data types 2018-01-16 17:21:19 +03:00
Evgeny Mankov 71d2fb20c8 [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.
2017-12-05 20:28:51 +03:00
Evgeny Mankov f24dfc6f36 [HIPIFY] remove duplicates from CUDA_IDENTIFIER_MAP 2017-12-05 19:46:53 +03:00
Evgeny Mankov aa05b3d84e Merge pull request #262 from ChrisKitching/frontendaction
[HIPIFY] Mostly fix preprocessor-or-template induced issues
2017-11-27 17:30:11 +03:00
Chris Kitching 24cdc5e1d3 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.
2017-11-13 20:58:54 +00:00
Chris Kitching 23b5d26582 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...
2017-11-13 17:20:07 +00:00
Chris Kitching c6707ef33c Remove CUDA_EXCLUDES
An artefact from a now-defunct hack to avoid corrupting programs
2017-10-27 20:12:32 +01:00
Chris Kitching 695a1eb059 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.
2017-10-24 20:38:49 +01:00
Chris Kitching 4ab29113a1 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.
2017-10-24 20:38:25 +01:00