Commit Graph

102 Commits

Author SHA1 Message Date
Ronan Desplanques
e9928e69f3 Apply temporary binding generation fix
This patch applies a temporary workaround to be able to use gnat-cuda
with CUDA 12.3.
2024-03-07 09:20:05 +02:00
Léo Germond
2245598adc fix shellcheck warnings 2023-09-12 10:21:52 +02:00
Léo Germond
97cf20f671 shellcheck: fix errors 2023-09-12 09:59:21 +02:00
Léo Germond
8da4f19659 which -> command -v 2023-09-07 13:50:10 +00:00
Leo Germond
a5ff391229 pre for invoking uwrap: gnatls 2023-09-07 13:50:10 +00:00
Tonu Naks
a000d6f532 Add bindings for __syncthreads 2023-08-25 07:59:51 +00:00
Tonu Naks
0827bfa90d Fix directory content check
Without quoting, the check behaves correctly. However, when
there is more than one file (or filename with space) it
throws a useless error message.

This reverts commit 80859a0a5647bd4f70aed6a123462e0426989fec.
2023-08-25 07:59:51 +00:00
Ronan Desplanques
863cbaf1f8 Disable device-side thick bindings generation
The device-side thick bindings are not usable at the moment, and they
tend to break with each new version of CUDA that NVIDIA releases.
This patch unhooks the generation of these bindings from `setup.sh`.
The uwrap files are left in the tree in the hope that they will be
fixed later.
2023-08-18 14:27:36 +03:00
Léo Germond
843d508245 check that uwrap creates files (#7) 2023-05-26 12:44:38 +00:00
Ronan Desplanques
726fab0a3d Fix typo in comment 2023-04-05 13:03:05 +02:00
Ronan Desplanques
e6ee3e3ad5 Add a storage model for CUDA page-locked memory
Page-locked memory in CUDA is described in section 3.2.6 of the CUDA
programming guide.
2023-04-05 13:03:05 +02:00
Ronan Desplanques
1b13ba99f8 Restrict the scope of "_v2" symbol transformation
A recent change added a UWrap rule to handle preprocessor macros
introduced in CUDA 12.0. Unfortunately, that change broke the
samples with CUDA 11.0.

This patch modifies the UWrap rule to have a much tighter scope.
Instead of trying to handle the general pattern of function
versioning used in upstream CUDA headers, it's now specifically
about the specific function that causes problem with our samples
and CUDA 12.0, cudaGetDeviceProperties.
2023-02-27 10:26:59 +01:00
Ronan Desplanques
c33be162dd Handle new definition of cudaGetDeviceProperties
Starting with CUDA 12.0, cuda_runtime_api.h defines
cudaGetDeviceProperties as a macro that expands to
cudaGetDeviceProperties_v2. That macro is not handled by
`gcc -fdump-ada-spec`.

This patch adds a UWrap rule that makes it so that the thick
bindings expose a Get_Device_Properties function that calls the
"_v2" version internally, just like the upstream C header does.
2023-02-15 15:59:22 +01:00
Quentin Ochem
7470bb2717 Fixed host and device binding, for VC20-035
For now, we need to duplicate most of the file contents. UWrap
doesn't allow for easy modularization of user files. As we're
looking at moving these files to a different tool, it's not worth
fixing at this stage.
2022-12-20 17:05:11 -05:00
Quentin Ochem
284f166c6c fixed last chance handler profile, VC08-046 2022-12-09 10:03:52 -05:00
Quentin Ochem
619f29d847 implemented support for run-time checks 2022-12-02 14:57:55 -05:00
Quentin Ochem
a52841ef12 Fixed issues with environment pointing to wrong ALIs.
TN: VB12-002
2022-11-10 19:56:08 -05:00
Quentin Ochem
9598a733d1 fixed blank lines at end of files 2022-10-29 18:10:32 -04:00
Quentin Ochem
47d57cc800 implemented tutorial 2022-10-27 21:35:23 -04:00
Quentin Ochem
d06e51af00 making progress on documentation and simplifications 2022-10-27 17:47:22 -04:00
Quentin Ochem
2a32ec2b80 Continued work on cleanup.
Wrapper now only selects -v to ptxas when set in verbose mode itself.
Various fixes in project files and Makefiles.
Added parameter to setup.sh to select GPU architecture.
2022-10-27 16:21:00 -04:00
Quentin Ochem
fccfe11a08 started cleanup following latest changes 2022-10-25 19:22:38 -04:00
QuentinOchem
c4ebc3e0f6 Merge pull request #77 from AdaCore/sal_fixes
Fixed SAL handing.
2022-10-25 09:03:36 -04:00
Quentin Ochem
e7e22a5fa1 fixed storage models device spec 2022-10-19 18:40:34 -04:00
Quentin Ochem
1d3fd5a6fc Fixed SAL handing.
This patches changes the way the compilation and library build
sequence. Compilation now stops at the production of the assembly
file, linking a static library results in a cubin, linking a dynamic
library will result in a fatbinary, to be included in a host main.

TN: VA19-044
2022-10-19 16:53:17 -04:00