Commits
Click on a commit to change the comparison range:sparkles: Decode GeoTIFF images to CUDA stream
Reading GeoTIFF images to GPU memory! Uses the `nvtiff-sys` crate for the I/O decoding, and `cudarc` crate to store the 1D array in CUDA memory. Putting this behind a 'cuda' feature flag since it does require a CUDA GPU. :necktie: Work out number of bytes to allocate memory for from file info
Calculated how many bytes of memory to allocate on the GPU from image_width x image_height x bits_per_pixel/8. :recycle: Refactor to avoid cloning of CudaSlice in to_cuda function
Store the CudaSlice as part of the CudaCogReader struct, initializing it with alloc_zeros in the `new` method, and filling it with actual decoded bytes in the `to_cuda` method. Return the decoded bytes in a CudaSlice using `upgrade_device_ptr`, which necessitates calling unsafe. Also need to store num_bytes somewhere in the struct. :mute: Don't run clippy on 'cuda' feature
GitHub Actions CI doesn't have CUDA, so getting `Failed to execute `nvcc`: Os { code: 2, kind: NotFound, message: "No such file or directory" }` when trying to compile `cudarc`. So just making clippy run on default features for now. :zap: Benchmark nvTIFF vs GDAL vs image-tiff on reading Sentinel-2 TCI
Set up benchmark to compare read speeds/throughput from reading a 318MB DEFLATE-compressed Sentinel-2 TCI file via nvTIFF, GDAL or image-tiff. Benchmarks ran using a patched version of criterion, with sample size of 10 for nvTIFF_GPU, and sample size of 30 for gdal_CPU and image-tiff_CPU.
Summary report is:
- read_cog/1_nvTIFF_GPU/Sentinel-2 TCI
time: [330.85 ms 344.04 ms 330.85 ms]
thrpt: [961.16 MB/s 924.31 MB/s 961.16 MB/s]
- read_cog/2_gdal_CPU/Sentinel-2 TCI
time: [1.0533 s 1.0543 s 1.0533 s]
thrpt: [301.91 MB/s 301.63 MB/s 301.91 MB/s]
- read_cog/3_image-tiff_CPU/Sentinel-2 TCI
time: [1.7426 s 1.7461 s 1.7426 s]
thrpt: [182.48 MB/s 182.12 MB/s 182.48 MB/s] :heavy_plus_sign: Add gdal-sys bundled and gdal-src with drive_gtiff
Fix for `The system library `gdal` required by crate `gdal-sys` was not found. The file `gdal.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory`. Using bundled gdal-sys, and building gdal-src with GTIFF driver. Inspired by https://github.com/georust/gdal/pull/646. :triangular_flag_on_post: Add note about using libgdal-dev locally
Using GDAL 3.10.3 locally from Debian to run the benchmarks. Otherwise getting some `undefined reference to `GDALRasterIOEx' ...` errors when trying to compile. Keeping the `gdal-src` and `gdal-sys` lines uncommented though to please CI.