AzIntEngineGPU: Check CUDA errors in constructor
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m52s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m56s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m9s
Build Packages / build:rpm (rocky8) (push) Successful in 12m54s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m11s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m21s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m56s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m18s
Build Packages / XDS test (durin plugin) (push) Successful in 9m16s
Build Packages / Generate python client (push) Successful in 10s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m30s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (rocky9) (push) Successful in 11m53s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m36s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m3s
Build Packages / Build documentation (push) Successful in 34s
Build Packages / DIALS test (push) Successful in 11m53s
Build Packages / Unit tests (push) Successful in 57m41s

cudaGetDeviceProperties and the two host-to-device cudaMemcpy calls
in the constructor were not error-checked, unlike the calls in Run().
Wrap them in cuda_err() so failures throw instead of passing silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 14:00:33 +02:00
parent 8e4cf98f8a
commit aa50e60f3c
+5 -5
View File
@@ -101,17 +101,17 @@ AzIntEngineGPU::AzIntEngineGPU(const AzimuthalIntegrationMapping &integration, s
cpu_count_reg(azint_count) {
cudaDeviceProp prop{};
cudaGetDeviceProperties(&prop, 0);
cuda_err(cudaGetDeviceProperties(&prop, 0));
threads = 128;
blocks = 4 * prop.multiProcessorCount;
shared_size = prop.sharedMemPerBlock;
shared_needed = azint_bins * (2 * sizeof(float) + sizeof(uint32_t));
cudaMemcpy(gpu_azint_correction, integration.Corrections().data(), sizeof(float) * npixel,
cudaMemcpyHostToDevice);
cudaMemcpy(gpu_pixel_to_bin, integration.GetPixelToBin().data(), sizeof(uint16_t) * npixel,
cudaMemcpyHostToDevice);
cuda_err(cudaMemcpy(gpu_azint_correction, integration.Corrections().data(), sizeof(float) * npixel,
cudaMemcpyHostToDevice));
cuda_err(cudaMemcpy(gpu_pixel_to_bin, integration.GetPixelToBin().data(), sizeof(uint16_t) * npixel,
cudaMemcpyHostToDevice));
}
void AzIntEngineGPU::Run(const ImagePreprocessorBuffer &image, AzimuthalIntegrationProfile &profile) {