Skip to content

Commit ec2f6d7

Browse files
committed
Merge remote-tracking branch 'origin/develop' into ji/slots-for-arrays
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
2 parents 5079069 + 3c5fbd3 commit ec2f6d7

18 files changed

Lines changed: 1358 additions & 537 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ jobs:
386386
fail-fast: false
387387
matrix:
388388
include:
389+
# We don't run memory sanitizer as it provides many false positives
390+
# for std
389391
- sanitizer: asan
390-
sanitizer_flags: "-Zsanitizer=address -Zsanitize=leak"
391-
- sanitizer: msan
392-
sanitizer_flags: "-Zsanitizer=memory"
392+
sanitizer_flags: "-Zsanitizer=address,leak"
393393
- sanitizer: tsan
394394
sanitizer_flags: "-Zsanitizer=thread"
395395
name: "Rust tests (${{ matrix.sanitizer }})"
@@ -421,15 +421,16 @@ jobs:
421421
run: |
422422
rustup toolchain install $NIGHTLY_TOOLCHAIN
423423
rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
424-
export RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}"
425424
- name: Build tests with sanitizer
426425
run: |
426+
RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
427427
cargo +$NIGHTLY_TOOLCHAIN build --locked --all-features \
428428
--target x86_64-unknown-linux-gnu -Zbuild-std \
429429
-p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
430430
431431
- name: Run tests with sanitizer
432432
run: |
433+
RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
433434
cargo +$NIGHTLY_TOOLCHAIN nextest run --locked --all-features \
434435
--target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \
435436
-p vortex-buffer -p vortex-fastlanes -p vortex-fsst -p vortex-alp -p vortex-array
@@ -440,6 +441,7 @@ jobs:
440441
# TODO(myrrc): remove --no-default-features once we make Mimalloc opt-in
441442
- name: Run vortex-ffi tests with sanitizer
442443
run: |
444+
RUSTFLAGS="${RUSTFLAGS} ${{ matrix.sanitizer_flags }}" \
443445
cargo +$NIGHTLY_TOOLCHAIN test --locked --no-default-features \
444446
--target x86_64-unknown-linux-gnu --no-fail-fast -Zbuild-std \
445447
-p vortex-ffi -- --no-capture
@@ -452,7 +454,7 @@ jobs:
452454
# We don't run memory sanitizer as it's clang-only and provides many
453455
# false positives for Catch2
454456
- sanitizer: asan
455-
sanitizer_flags: "-Zsanitizer=address -Zsanitize=leak"
457+
sanitizer_flags: "-Zsanitizer=address,leak"
456458
- sanitizer: tsan
457459
sanitizer_flags: "-Zsanitizer=thread"
458460
name: "Rust/C++ FFI tests (${{ matrix.sanitizer }})"
@@ -486,15 +488,13 @@ jobs:
486488
run: |
487489
rustup toolchain install $NIGHTLY_TOOLCHAIN
488490
rustup component add --toolchain $NIGHTLY_TOOLCHAIN rust-src rustfmt clippy llvm-tools-preview
489-
490-
# Export flags here so that rustfilt won't be built with sanitizers
491-
export RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \
492-
--cfg disable_loom --cfg vortex_nightly -C debuginfo=2 \
493-
-C opt-level=0 -C strip=none -Zexternal-clangrt \
494-
${{ matrix.sanitizer_flags }}"
495491
- name: Build FFI library
496492
run: |
497493
# TODO(myrrc): remove --no-default-features
494+
RUSTFLAGS="-A warnings -Cunsafe-allow-abi-mismatch=sanitizer \
495+
--cfg disable_loom --cfg vortex_nightly -C debuginfo=2 \
496+
-C opt-level=0 -C strip=none -Zexternal-clangrt \
497+
${{ matrix.sanitizer_flags }}" \
498498
cargo +$NIGHTLY_TOOLCHAIN build --locked --no-default-features \
499499
--target x86_64-unknown-linux-gnu -Zbuild-std \
500500
-p vortex-ffi

.github/workflows/compat-gen-upload.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
&& format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=compat-gen-dry-run', github.run_id)
2929
|| 'ubuntu-latest' }}
3030
permissions:
31+
id-token: write
3132
contents: read
3233
outputs:
3334
version: ${{ steps.detect.outputs.version }}
@@ -41,6 +42,12 @@ jobs:
4142
fetch-depth: 0
4243
- uses: ./.github/actions/setup-prebuild
4344

45+
- name: Configure AWS credentials
46+
uses: aws-actions/configure-aws-credentials@v6
47+
with:
48+
role-to-assume: "arn:aws:iam::245040174862:role/GitHubCompatUploadRole"
49+
aws-region: us-east-1
50+
4451
- name: Detect version
4552
id: detect
4653
run: |
@@ -87,7 +94,7 @@ jobs:
8794
- name: Configure AWS credentials
8895
uses: aws-actions/configure-aws-credentials@v6
8996
with:
90-
role-to-assume: "arn:aws:iam::245040174862:role/GitHubBenchmarkRole"
97+
role-to-assume: "arn:aws:iam::245040174862:role/GitHubCompatUploadRole"
9198
aws-region: us-east-1
9299

93100
- name: Upload fixtures for v${{ needs.dry-run.outputs.version }}

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ unexpected_cfgs = { level = "deny", check-cfg = [
315315
"cfg(codspeed)",
316316
"cfg(disable_loom)",
317317
"cfg(vortex_nightly)",
318+
'cfg(target_os, values("unknown"))',
318319
] }
319320
warnings = "warn"
320321

fuzz/src/lib.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ pub use native_runtime::RUNTIME;
6464
#[cfg(not(target_arch = "wasm32"))]
6565
pub use native_runtime::SESSION;
6666

67-
#[cfg(target_arch = "wasm32")]
67+
// target_os = "unknown" matches wasm32-unknown-unknown (browser), excluding WASI targets
68+
// where wasm-bindgen's JS interop is not available.
69+
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
6870
mod wasm_runtime {
6971
use std::sync::LazyLock;
7072

@@ -77,5 +79,20 @@ mod wasm_runtime {
7779
LazyLock::new(|| VortexSession::default().with_handle(WasmRuntime::handle()));
7880
}
7981

80-
#[cfg(target_arch = "wasm32")]
82+
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
8183
pub use wasm_runtime::SESSION;
84+
85+
/// WASI targets get a session without an async runtime handle since wasm-bindgen
86+
/// is not available. The fuzz workloads are synchronous, so this is sufficient.
87+
#[cfg(all(target_arch = "wasm32", not(target_os = "unknown")))]
88+
mod wasi_runtime {
89+
use std::sync::LazyLock;
90+
91+
use vortex::VortexSessionDefault;
92+
use vortex_session::VortexSession;
93+
94+
pub static SESSION: LazyLock<VortexSession> = LazyLock::new(VortexSession::default);
95+
}
96+
97+
#[cfg(all(target_arch = "wasm32", not(target_os = "unknown")))]
98+
pub use wasi_runtime::SESSION;

vortex-cuda/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ async-trait = { workspace = true }
2828
bytes = { workspace = true }
2929
cudarc = { workspace = true, features = ["f16"] }
3030
futures = { workspace = true, features = ["executor"] }
31+
itertools = { workspace = true }
3132
kanal = { workspace = true }
3233
object_store = { workspace = true, features = ["fs"] }
3334
parking_lot = { workspace = true }

vortex-cuda/benches/dynamic_dispatch_cuda.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ use vortex_cuda::CudaDeviceBuffer;
4040
use vortex_cuda::CudaExecutionCtx;
4141
use vortex_cuda::CudaSession;
4242
use vortex_cuda::dynamic_dispatch::CudaDispatchPlan;
43+
use vortex_cuda::dynamic_dispatch::DispatchPlan;
4344
use vortex_cuda::dynamic_dispatch::MaterializedPlan;
44-
use vortex_cuda::dynamic_dispatch::UnmaterializedPlan;
4545
use vortex_cuda_macros::cuda_available;
4646
use vortex_cuda_macros::cuda_not_available;
4747

@@ -123,13 +123,15 @@ struct BenchRunner {
123123

124124
impl BenchRunner {
125125
fn new(array: &vortex::array::ArrayRef, len: usize, cuda_ctx: &CudaExecutionCtx) -> Self {
126+
let plan = match DispatchPlan::new(array).vortex_expect("build_dyn_dispatch_plan") {
127+
DispatchPlan::Fused(plan) => plan,
128+
_ => unreachable!("encoding not fusable"),
129+
};
126130
let MaterializedPlan {
127131
dispatch_plan,
128132
device_buffers,
129133
shared_mem_bytes,
130-
} = UnmaterializedPlan::new(array)
131-
.and_then(|p| p.materialize(cuda_ctx))
132-
.vortex_expect("build_dyn_dispatch_plan");
134+
} = plan.materialize(cuda_ctx).vortex_expect("materialize plan");
133135

134136
let device_plan = Arc::new(
135137
cuda_ctx

0 commit comments

Comments
 (0)