Graf commitů

17 Commity

Autor SHA1 Zpráva Datum
Evgeny Mankov aaa9559768 [HIPIFY][fix] CUDA and cuBLAS main headers correct handling 2018-01-23 23:43:36 +03:00
Evgeny Mankov 1ecb5b5901 [HIPIFY] Sync with hipBLAS ToT and CUDA cuBLAS 9.1 2018-01-22 17:12:02 +03:00
Evgeny Mankov 5b1b3438fd [HIPIFY] cuRAND lib support (Device) 2018-01-19 21:29:05 +03:00
Evgeny Mankov 2e2e38f163 [HIPIFY] cuRAND lib support (partial - only Host) 2018-01-19 17:38:51 +03:00
Evgeny Mankov a8cae9ec07 Merge pull request #332 from emankov/cudaMap_2
[HIPIFY] Add cudaMalloc3D support
2018-01-18 13:05:57 +03:00
Evgeny Mankov eb27585136 [HIPIFY] Add cudaMalloc3D support 2018-01-18 12:28:56 +03:00
Evgeny Mankov 2bf8cc691b [HIPIFY] Add CUDA Driver API Texture Ref support (partial) 2018-01-18 12:03:03 +03:00
Evgeny Mankov e2ac6c6296 [HIPIFY] Add more supported by HIP CUDA Driver API Arrays data types and functions 2018-01-16 21:07:50 +03:00
Evgeny Mankov 23889e7987 [HIPIFY] Add more supported by HIP CUDA RT API Textures and Arrays data types 2018-01-16 17:21:19 +03:00
Evgeny Mankov ccc959fdc9 [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 43f0a14005 [HIPIFY] remove duplicates from CUDA_IDENTIFIER_MAP 2017-12-05 19:46:53 +03:00
Evgeny Mankov b25d199111 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 7a441aef10 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 9014c89f04 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 51df93cf25 Remove CUDA_EXCLUDES
An artefact from a now-defunct hack to avoid corrupting programs
2017-10-27 20:12:32 +01:00
Chris Kitching 9da456b315 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 803d3ffd9c 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