Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Test
if: matrix.name == 'test'
run: |
cargo test --workspace --all-targets --all-features
cargo test --workspace --all-targets --features all-except-gpu
# Clean up intermediate build artifacts to free disk space aggressively
cargo clean -p sedona-s2geography
rm -rf target/debug/deps
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,4 @@ sedona-gdal = { version = "0.4.0", path = "c/sedona-gdal", default-features = fa
sedona-proj = { version = "0.4.0", path = "c/sedona-proj", default-features = false }
sedona-s2geography = { version = "0.4.0", path = "c/sedona-s2geography" }
sedona-tg = { version = "0.4.0", path = "c/sedona-tg" }
sedona-libgpuspatial = { version = "0.4.0", path = "c/sedona-libgpuspatial" }
31 changes: 31 additions & 0 deletions rust/sedona-common/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ config_namespace! {

/// Options for debugging or testing spatial join
pub debug : SpatialJoinDebugOptions, default = SpatialJoinDebugOptions::default()

/// GPU acceleration options
pub gpu: GpuOptions, default = GpuOptions::default()
}
}

Expand All @@ -129,6 +132,34 @@ config_namespace! {
}
}

config_namespace! {
/// Configuration options for GPU-accelerated spatial joins
pub struct GpuOptions {
/// Enable GPU-accelerated spatial joins (requires CUDA and GPU feature flag)
pub enable: bool, default = false

// Concatenate all geometries on the build-side into a single buffer for GPU processing
pub concat_build: bool, default = true

/// GPU device ID to use (0 = first GPU, 1 = second, etc.)
pub device_id: usize, default = 0

/// Fall back to CPU if GPU initialization or execution fails
pub fallback_to_cpu: bool, default = true
/// Use CUDA memory pool for GPU memory management
pub use_memory_pool: bool, default = true
/// Percentage of total GPU memory to initialize CUDA memory pool (between 0% and 100%)
pub memory_pool_init_percentage: usize, default = 50

/// Overlapping parsing and refinement by pipelining multiple batches; 1 means no pipelining
pub pipeline_batches: usize, default = 1


/// Compress BVH to reduce memory usage for processing larger datasets at the cost of some performance
pub compress_bvh: bool, default = false
}
}

#[derive(Debug, PartialEq, Clone, Copy)]
pub enum NumSpatialPartitionsConfig {
/// Automatically determine the number of spatial partitions
Expand Down
3 changes: 3 additions & 0 deletions rust/sedona-spatial-join/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ result_large_err = "allow"

[features]
backtrace = ["datafusion-common/backtrace"]
# Enable GPU acceleration (requires CUDA toolkit and sedona-libgpuspatial with gpu feature)
gpu = ["sedona-libgpuspatial/gpu"]

[dependencies]
async-trait = { workspace = true }
Expand Down Expand Up @@ -63,6 +65,7 @@ sedona-geometry = { workspace = true }
sedona-schema = { workspace = true }
sedona-tg = { workspace = true }
sedona-geos = { workspace = true }
sedona-libgpuspatial = { workspace = true }
wkb = { workspace = true }
geo-index = { workspace = true }
geos = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions rust/sedona-spatial-join/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
pub(crate) mod build_side_collector;
pub(crate) mod default_spatial_index;
pub(crate) mod default_spatial_index_builder;
pub(crate) mod gpu_spatial_index;
mod gpu_spatial_index_builder;
mod knn_adapter;
pub(crate) mod memory_plan;
pub(crate) mod partitioned_index_provider;
Expand Down
Loading
Loading