This commit adds a new example that mirrors the asyncAPI sample
from NVIDIA's cuda-samples repository. The minimal required version
of GNAT is also bumped to ensure the presence of recent storage
model fixes.
Before this patch, the pragma CUDA_Execute in the vectorAdd sample
had its arguments in the wrong order. The resulting execution
configuration was in range for most devices, which explains why the
problem was undetected.
This patch puts the arguments of this pragma CUDA_Execute in their
expected order.
Starting with version 11.6, CUDA does not come with samples in the
distribution anymore. The recommended source for samples is now
https://github.com/nvidia/cuda-samples.
In the newly recommended repository, the directory hierarchy is
different from the one that came with CUDA. The renaming that this
patch performs makes GNAT for CUDA samples mirror the CUDA samples
from https://github.com/nvidia/cuda-samples.
Releasing an array with CUDA async storage model requires accessing
the underlying stream of the model, so the stream cannot be released
before the array. This patch enforces that principle.
TN: W106-039
Before this patch, we used a workaround in the simpleStreams example
to avoid a crash. Recent improvements in GNAT have made the
workaround unnecessary, so this patch removes it, and documents the
new minimum required version of GNAT.
Two resource deallocation statements in the simpleStreams example
raise exceptions for an unknown reason. Until this is investigated
and fixed, comment out those statements and rely on program
termination to release resources.