Commit Graph

54851 Commits

Author SHA1 Message Date
Chris Kitching c1f4612176 Prefer early-return to deep nesting
A chain of 7 closing braces is never a great sign :D

In the process it became apparant that the unsupported flag
was being silently ignored, causing users to be left with cuda
API calls in their programs with no warning given. This has been
rectified for consistency.
2017-10-26 17:26:37 +01:00
Chris Kitching 35a892bc77 Prefer early-return to deep nesting
A chain of 7 closing braces is never a great sign :D

In the process it became apparant that the unsupported flag
was being silently ignored, causing users to be left with cuda
API calls in their programs with no warning given. This has been
rectified for consistency.
2017-10-26 17:26:37 +01:00
Chris Kitching 07fb675fe7 Do not process __fetch_builtin_* in cudaCall()
Fixes #205


[ROCm/clr commit: d5fd5e55c5]
2017-10-26 17:23:55 +01:00
Chris Kitching d5fd5e55c5 Do not process __fetch_builtin_* in cudaCall()
Fixes #205
2017-10-26 17:23:55 +01:00
Chris Kitching 2a5acac80e Do not process __fetch_builtin_* in cudaCall()
Fixes #205
2017-10-26 17:23:55 +01:00
Evgeny Mankov 2371dda65e Merge pull request #213 from ChrisKitching/simplify
[HIPIFY] Simplify (and accelerate) hipification of CUDA type identifiers

[ROCm/clr commit: fbdedd9196]
2017-10-26 19:17:01 +03:00
Evgeny Mankov fbdedd9196 Merge pull request #213 from ChrisKitching/simplify
[HIPIFY] Simplify (and accelerate) hipification of CUDA type identifiers
2017-10-26 19:17:01 +03:00
Evgeny Mankov 3bacb69e20 Merge pull request #213 from ChrisKitching/simplify
[HIPIFY] Simplify (and accelerate) hipification of CUDA type identifiers
2017-10-26 19:17:01 +03:00
foreman 4bca203504 P4 to Git Change 1475035 by johtaylo@johtaylo-jtincrementor2-increment on 2017/10/26 03:00:04
SWDEV-2 - Change OpenCL version number from 2527 to 2528.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2275 edit


[ROCm/clr commit: d4d5d461f2]
2017-10-26 03:09:26 -04:00
foreman d4d5d461f2 P4 to Git Change 1475035 by johtaylo@johtaylo-jtincrementor2-increment on 2017/10/26 03:00:04
SWDEV-2 - Change OpenCL version number from 2527 to 2528.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2275 edit
2017-10-26 03:09:26 -04:00
Sean Keely aece2f8fc2 Remove make build file.
Change-Id: I86abae4c44b6c606fb850eff6d44cdbf30cf59f5
2017-10-26 01:12:31 -04:00
Sean Keely 718134a369 Remove make build file.
Change-Id: I86abae4c44b6c606fb850eff6d44cdbf30cf59f5


[ROCm/ROCR-Runtime commit: aece2f8fc2]
2017-10-26 01:12:31 -04:00
Jan Vesely d8a8f88737 cmake: make sure there are no undefined symbols
Change-Id: Id5a268d7e512f71c1a65af598543eb60ae6c3596
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2017-10-25 17:46:58 -04:00
Jan Vesely d28f85fb3a cmake: make sure there are no undefined symbols
Change-Id: Id5a268d7e512f71c1a65af598543eb60ae6c3596
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: d8a8f88737]
2017-10-25 17:46:58 -04:00
Jan Vesely 383f275aa7 cmake: Use pkg-config to find libpci
Change-Id: I1ab4397d88a2bd48ce0d6f2d3c33efcf47bc442f
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
2017-10-25 17:46:58 -04:00
Jan Vesely 0dded82034 cmake: Use pkg-config to find libpci
Change-Id: I1ab4397d88a2bd48ce0d6f2d3c33efcf47bc442f
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>


[ROCm/ROCR-Runtime commit: 383f275aa7]
2017-10-25 17:46:58 -04:00
Ben Sander 0a82572fa2 Merge pull request #232 from kknox/update-cuda-version
Update container to newer cuda driver and sdk 9.0

[ROCm/clr commit: cf9eb832a2]
2017-10-25 23:45:24 +02:00
Ben Sander cf9eb832a2 Merge pull request #232 from kknox/update-cuda-version
Update container to newer cuda driver and sdk 9.0
2017-10-25 23:45:24 +02:00
Ben Sander c0ef6d7b62 Merge pull request #232 from kknox/update-cuda-version
Update container to newer cuda driver and sdk 9.0
2017-10-25 23:45:24 +02:00
Kent Knox f32e20abc7 Update container to newer cuda driver and sdk 9.0
[ROCm/clr commit: f81d6d5bb3]
2017-10-25 16:14:32 -05:00
Kent Knox f81d6d5bb3 Update container to newer cuda driver and sdk 9.0 2017-10-25 16:14:32 -05:00
Kent Knox 160d92af20 Update container to newer cuda driver and sdk 9.0 2017-10-25 16:14:32 -05:00
Ben Sander 4593effbe8 Clean up test to address review feedback.
[ROCm/clr commit: cc2bcbcbcf]
2017-10-25 16:08:16 -05:00
Ben Sander cc2bcbcbcf Clean up test to address review feedback. 2017-10-25 16:08:16 -05:00
Ben Sander ca1230300a Clean up test to address review feedback. 2017-10-25 16:08:16 -05:00
Siu Chi Chan d97b4b55cc add HC_FEATURE_PRINTF around the printf buffer definition
[ROCm/clr commit: 085d63099c]
2017-10-25 12:00:02 -04:00
Siu Chi Chan 085d63099c add HC_FEATURE_PRINTF around the printf buffer definition 2017-10-25 12:00:02 -04:00
Siu Chi Chan d91a4f5bd6 add HC_FEATURE_PRINTF around the printf buffer definition 2017-10-25 12:00:02 -04:00
Jenkins 15be3fe148 Merge 'master' into 'amd-master'
Change-Id: Ia6d5094661ae65493a229b124e2eaf6c9e7a25a3


[ROCm/clr commit: 9a89ce4274]
2017-10-25 04:10:37 -05:00
Jenkins 9a89ce4274 Merge 'master' into 'amd-master'
Change-Id: Ia6d5094661ae65493a229b124e2eaf6c9e7a25a3
2017-10-25 04:10:37 -05:00
Jenkins 095222baf9 Merge 'master' into 'amd-master'
Change-Id: Ia6d5094661ae65493a229b124e2eaf6c9e7a25a3
2017-10-25 04:10:37 -05:00
foreman fb9aef2b3f P4 to Git Change 1474524 by johtaylo@johtaylo-jtincrementor2-increment on 2017/10/25 03:00:04
SWDEV-2 - Change OpenCL version number from 2526 to 2527.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2274 edit


[ROCm/clr commit: b1a0f35af9]
2017-10-25 03:08:52 -04:00
foreman b1a0f35af9 P4 to Git Change 1474524 by johtaylo@johtaylo-jtincrementor2-increment on 2017/10/25 03:00:04
SWDEV-2 - Change OpenCL version number from 2526 to 2527.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#2274 edit
2017-10-25 03:08:52 -04:00
Sean Keely 6ee2ccb08b Fix error message description.
Change-Id: I32efed68e970a4882aca9decbbcda3fcd5c5cb43
2017-10-24 21:52:21 -05:00
Sean Keely 0a4a1a2433 Fix error message description.
Change-Id: I32efed68e970a4882aca9decbbcda3fcd5c5cb43


[ROCm/ROCR-Runtime commit: 6ee2ccb08b]
2017-10-24 21:52:21 -05:00
Chris Kitching 31920efae1 Don't use now-defunct cmake variable in lit test config
[ROCm/clr commit: 8d91579dcf]
2017-10-24 20:52:51 +01:00
Chris Kitching 8d91579dcf Don't use now-defunct cmake variable in lit test config 2017-10-24 20:52:51 +01:00
Chris Kitching 59071b895e Don't use now-defunct cmake variable in lit test config 2017-10-24 20:52:51 +01:00
Chris Kitching 5ee04d16c5 Refactor cudaCall to prefer early return to deep nesting
Sorry for the invasive refactor, but this was making reasoning
about this function more difficult.


[ROCm/clr commit: b24b33ee2e]
2017-10-24 20:38:49 +01:00
Chris Kitching b24b33ee2e Refactor cudaCall to prefer early return to deep nesting
Sorry for the invasive refactor, but this was making reasoning
about this function more difficult.
2017-10-24 20:38:49 +01:00
Chris Kitching 778d6827f9 Refactor cudaCall to prefer early return to deep nesting
Sorry for the invasive refactor, but this was making reasoning
about this function more difficult.
2017-10-24 20:38:49 +01:00
Chris Kitching 4d23fb75e9 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/clr commit: 9da456b315]
2017-10-24 20:38:49 +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 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 a00a5e3101 One matcher for type expressions to rule them all
Previously, there were different AST matchers for each
language construct that contains a type reference, and custom
logic to perform the transformation within each of those
structures.

Since the transformation in all such cases was only replacing
CUDA types with hip ones, we can instead use an AST matcher
that finds and updates the type references directly.
This simplifies the program considerably, and it won't fail
when it finds a language feature (or complicated type expression)
that nobody wrote custom logic for yet.


[ROCm/clr commit: 93c9b3ca34]
2017-10-24 20:38:49 +01:00
Chris Kitching 93c9b3ca34 One matcher for type expressions to rule them all
Previously, there were different AST matchers for each
language construct that contains a type reference, and custom
logic to perform the transformation within each of those
structures.

Since the transformation in all such cases was only replacing
CUDA types with hip ones, we can instead use an AST matcher
that finds and updates the type references directly.
This simplifies the program considerably, and it won't fail
when it finds a language feature (or complicated type expression)
that nobody wrote custom logic for yet.
2017-10-24 20:38:49 +01:00
Chris Kitching a1d8340314 One matcher for type expressions to rule them all
Previously, there were different AST matchers for each
language construct that contains a type reference, and custom
logic to perform the transformation within each of those
structures.

Since the transformation in all such cases was only replacing
CUDA types with hip ones, we can instead use an AST matcher
that finds and updates the type references directly.
This simplifies the program considerably, and it won't fail
when it finds a language feature (or complicated type expression)
that nobody wrote custom logic for yet.
2017-10-24 20:38:49 +01:00
Chris Kitching 1a53e259b3 Make control flow less insane
`while(false)` is certainly a bold choice.


[ROCm/clr commit: 3b2d8029fb]
2017-10-24 20:38:49 +01:00
Chris Kitching 3b2d8029fb Make control flow less insane
`while(false)` is certainly a bold choice.
2017-10-24 20:38:49 +01:00
Chris Kitching 182d346356 Make control flow less insane
`while(false)` is certainly a bold choice.
2017-10-24 20:38:49 +01:00