109 Commits

Author SHA1 Message Date
Ronan Desplanques
8d1a791cd8 Fix typo in binding generation script
The typo's only consequence is to add an extra line to the logs shown
when running setup.sh.
2023-12-04 10:32:25 +01:00
Ronan Desplanques
625a2b945a Apply temporary binding generation fix
This patch applies a temporary workaround to be able to use gnat-cuda
with CUDA 12.3.
2023-11-21 09:15:59 +00:00
Ronan Desplanques
d7dcacadb8 Support generating binding with cross toolchain
This patch adds some machinery to the build system to make it
possible to leverage a cross compiler for binding generation. It
also updates the documentation to remove the requirement of a native
compiler in the cross-compilation case.
2023-11-17 15:17:10 +01:00
Tonu Naks
d6d1b2eff8 Add instructions for using CUDA_ROOT
Rename cuda_host to CUDA_HOST in order to
comply with common environment variable naming
conventions.

Solves eng/toolchain/cuda#32
2023-11-16 13:39:45 +00:00
Ronan Desplanques
a7a920f0d1 Take CUDA_ROOT into account in GPR project file
cuda_api_host.gpr was the only place where support for the CUDA_ROOT
environment variable was missing. This patch adds that support, and
with that it becomes possible to build the examples with a CUDA installation
that does not live in /usr/local/cuda.

Issue: eng/toolchain/cuda#32
2023-11-08 14:57:29 +00:00
Leo Germond
63b9aa8d7d bind.sh: fix quotes 2023-11-02 15:13:37 +01:00
Leo Germond
7efe5e9cdd fix shellcheck warnings 2023-10-16 18:06:54 +02:00
Ronan Desplanques
872c19d567 Fix cross-compilation machinery
Before this patch, there were a few things missing for things
to work when setting the cuda_host environment variable to aarch64-linux.
This patch adds the missing bits.
2023-10-04 12:27:55 +00: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