Skip to content
Merged
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
17 changes: 1 addition & 16 deletions vortex-cuda/benches/alp_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ use vortex::encodings::alp::ALPFloat;
use vortex::encodings::alp::alp_encode;
use vortex::error::VortexExpect;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_array::test_harness::mark_optimized;
use vortex_cuda::CudaDispatchMode;
use vortex_cuda::CudaSession;
Expand All @@ -50,16 +44,7 @@ use vortex_cuda_macros::cuda_not_available;
use crate::bench_config::BENCH_SIZES;
use crate::timed_launch_strategy::TimedLaunchStrategy;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_cuda::cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
17 changes: 1 addition & 16 deletions vortex-cuda/benches/arrow_validity_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ use vortex::dtype::PType;
use vortex::error::VortexExpect;
use vortex::error::VortexResult;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_array::test_harness::mark_optimized;
use vortex_cuda::CudaExecutionCtx;
use vortex_cuda::CudaSession;
Expand All @@ -46,16 +40,7 @@ use vortex_cuda_macros::cuda_not_available;

use crate::timed_launch_strategy::TimedLaunchStrategy;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_cuda::cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
17 changes: 1 addition & 16 deletions vortex-cuda/benches/bitpacked_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ use vortex::encodings::fastlanes::BitPackedData;
use vortex::encodings::fastlanes::unpack_iter::BitPacked;
use vortex::error::VortexExpect;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_array::test_harness::mark_optimized;
use vortex_cuda::CudaDispatchMode;
use vortex_cuda::CudaSession;
Expand All @@ -48,16 +42,7 @@ use vortex_cuda_macros::cuda_not_available;

use crate::timed_launch_strategy::TimedLaunchStrategy;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_cuda::cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
17 changes: 1 addition & 16 deletions vortex-cuda/benches/delta_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ use vortex::encodings::fastlanes::Delta;
use vortex::encodings::fastlanes::DeltaArray;
use vortex::error::VortexExpect;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_array::test_harness::mark_optimized;
use vortex_cuda::CudaDispatchMode;
use vortex_cuda::CudaSession;
Expand All @@ -50,16 +44,7 @@ use vortex_cuda_macros::cuda_not_available;
use crate::bench_config::BENCH_SIZES;
use crate::timed_launch_strategy::TimedLaunchStrategy;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_cuda::cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
17 changes: 1 addition & 16 deletions vortex-cuda/benches/dynamic_dispatch_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ use vortex::error::VortexResult;
use vortex::error::vortex_err;
use vortex::error::vortex_panic;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_cuda::CudaBufferExt;
use vortex_cuda::CudaDispatchMode;
use vortex_cuda::CudaExecutionCtx;
Expand All @@ -81,16 +75,7 @@ use vortex_cuda_macros::cuda_not_available;

use crate::bench_config::BENCH_SIZES;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
17 changes: 1 addition & 16 deletions vortex-cuda/benches/for_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ use vortex::encodings::fastlanes::FoRArray;
use vortex::error::VortexExpect;
use vortex::scalar::Scalar;
use vortex::session::VortexSession;
use vortex_array::aggregate_fn::session::AggregateFnSession;
use vortex_array::dtype::session::DTypeSession;
use vortex_array::memory::MemorySession;
use vortex_array::optimizer::kernels::KernelSession;
use vortex_array::scalar_fn::session::ScalarFnSession;
use vortex_array::session::ArraySession;
use vortex_array::test_harness::mark_optimized;
use vortex_cuda::CudaDispatchMode;
use vortex_cuda::CudaSession;
Expand All @@ -51,16 +45,7 @@ use vortex_cuda_macros::cuda_not_available;
use crate::bench_config::BENCH_SIZES;
use crate::timed_launch_strategy::TimedLaunchStrategy;

static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with::<CudaSession>()
});
static SESSION: LazyLock<VortexSession> = LazyLock::new(vortex_cuda::cuda_session);

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
Expand Down
23 changes: 5 additions & 18 deletions vortex-cuda/benches/fsst_cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@ use futures::executor::block_on;
use mimalloc::MiMalloc;
use vortex::array::ArrayRef;
use vortex::array::IntoArray;
use vortex::array::aggregate_fn::session::AggregateFnSession;
use vortex::array::arrays::PrimitiveArray;
use vortex::array::dtype::session::DTypeSession;
use vortex::array::match_each_integer_ptype;
use vortex::array::memory::MemorySession;
use vortex::array::optimizer::kernels::KernelSession;
use vortex::array::scalar_fn::session::ScalarFnSession;
use vortex::array::session::ArraySession;
use vortex::dtype::DType;
use vortex::dtype::Nullability;
use vortex::encodings::fsst::FSST;
Expand Down Expand Up @@ -58,18 +52,11 @@ static GLOBAL: MiMalloc = MiMalloc;
const BENCH_SIZES: &[(usize, &str)] = &[(10_000_000, "10M")];

fn session_with_varbin_layout(layout: VarBinExportLayout) -> VortexSession {
VortexSession::empty()
.with::<ArraySession>()
.with::<KernelSession>()
.with::<DTypeSession>()
.with::<ScalarFnSession>()
.with::<AggregateFnSession>()
.with::<MemorySession>()
.with_some(
CudaSession::try_default()
.vortex_expect("failed to create CUDA session")
.with_varbin_export_layout(layout),
)
VortexSession::empty().with_some(
CudaSession::try_default()
.vortex_expect("failed to create CUDA session")
.with_varbin_export_layout(layout),
)
}

static VARBIN_SESSION: LazyLock<VortexSession> =
Expand Down
5 changes: 3 additions & 2 deletions vortex-cuda/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ pub fn initialize_cuda(session: &CudaSession) {
session.register_kernel(Slice.id(), &SliceExecutor);
}

/// Builds a fresh [`VortexSession`](vortex::session::VortexSession) with all array session
/// variables plus a default [`CudaSession`], for use in CUDA tests and benchmarks.
/// Builds a fresh [`VortexSession`](vortex::session::VortexSession) with a default
/// [`CudaSession`] for CUDA tests and benchmarks. Array session variables are initialized
/// with their defaults on first use.
///
/// Each call returns an independent session with its own kernel registry and stream pool.
/// Live default sessions share a CUDA context and its device memory pool. Tests requiring isolated
Expand Down
Loading