Commit Graph
9 Commits
Author SHA1 Message Date
Carles Fernandez fb9d405022 Make clang-tidy happy 2026-09-24 10:00:28 +02:00
Carles Fernandez 360f349209 Fix building in old setups 2026-09-22 08:15:11 +02:00
Carles Fernandez 65cca85178 Fix CUDA acquisition upload ordering and validation
- Order code and carrier uploads on the compute stream and wait before
  returning so callers can safely reuse host buffers.
- Verify CUDA readiness and completed grid counts in adapter tests,
  rejecting unexpected CPU fallback.
- Exercise host-buffer reuse in engine parity tests.
- Correct the Jetson helper's test executable path.
- Use ArgsProduct for compatibility with Google Benchmark 1.9.2–1.9.5.
2026-09-21 17:18:55 +02:00
Phillip Vu 726cf2c455 Use American spelling and plain punctuation in CUDA docs and comments
Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:40 -07:00
Phillip Vu 5a8e56ed02 CUDA: fix build on modern toolkits/Jetson, add GPU PCPS acquisition engine
Build system:
- Drop hardcoded sm_30 (Kepler) nvcc flags rejected by CUDA >= 11; honour
  CMAKE_CUDA_ARCHITECTURES, auto-detect Jetson SoCs from the device tree
  (Orin 87, Xavier 72, TX2 62, Nano 53) or use "native" with CMake >= 3.24.
- CUDA standard follows the host C++ standard (C++17).
- find_package(CUDAToolkit) and explicit CUDA::cudart / CUDA::cufft links.
- Define CUDA_GPU_ACCEL project-wide; keep -Wno-psabi away from nvcc.

Acquisition:
- New CudaPcpsEngine (acquisition/libs/cuda_pcps_engine.{h,cu}): batched
  cuFFT evaluation of the Doppler x code-phase grid, one stream per block.
- pcps_acquisition::doppler_grid() dispatches to the engine when
  Acquisition_XX.use_cuda=true (or GNSS-SDR.use_cuda_acquisition=true),
  falling back to the CPU loop on any failure. Peak search and statistics
  are unchanged.

Tracking (GPS_L1_CA_DLL_PLL_Tracking_GPU):
- Split the racy single-launch wipe-off + correlator kernel into two
  launches on the same stream.
- cudaHostAllocMapped || cudaHostAllocWriteCombined -> cudaHostAllocMapped.
- No cudaDeviceReset() in the per-channel teardown; do not cudaFree()
  device aliases of host-mapped buffers; const-correct GPU_Complex.

Tests/docs:
- CudaPcpsEngineTest (GPU grid vs CPU reference incl. accumulation,
  bit-transition mode, 4 ms integration) and GpsL1CaPcpsAcquisitionCudaTest
  (full adapter on a real capture, CPU vs GPU estimates).
- benchmark_pcps_grid: CPU baseline vs GPU sweep.
- docs/JETSON.md build/verify/benchmark guide; README, changelog, sample
  config updates.

Signed-off-by: Phillip Vu <36169227+phillipvu@users.noreply.github.com>
2026-09-21 06:26:39 -07:00
Carles Fernandez 4c424547d2 CMake: fix broken install path 2026-06-17 16:35:59 +02:00
Carles Fernandez d6e0fded84 CMake: Harden handling of bundled static dependencies 2026-05-10 13:57:00 +02:00
Carles Fernandez 0a0154e1af Fix warnings when building benchmarks 2024-10-06 08:14:46 +02:00
Carles Fernandez 825037592a Remove build and data folders, move tests and utils to the base of the source tree 2024-10-04 11:55:09 +02:00