Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4e490c7
Move 0aEXPLORATION to can-it-do-scan branch
springyworks Aug 11, 2025
d9a00f6
feat: Implement efficient CUDA scan operations with comprehensive CPU…
springyworks Aug 11, 2025
92481e9
feat: Add initial FFT implementation framework
springyworks Aug 11, 2025
34b6391
Add comprehensive FFT implementation with CPU and CUDA backends
springyworks Aug 11, 2025
0d61afb
feat(exploration,fft): closed-loop tensor viz, GPU display prototypes…
springyworks Aug 11, 2025
157ac0c
Staging changes before running Clippy fixes
springyworks Aug 12, 2025
7806fb1
candle-core(cuda/fft): VkFFT CUDA R2C f32 minimal path\n- wire Rust p…
springyworks Aug 12, 2025
62d2d37
exploration: GPU FFT demo – dual-pane animation with device-side gene…
springyworks Aug 12, 2025
45f832e
notebooks: add minimal evcxr quickstart using local candle-core/candl…
springyworks Aug 13, 2025
c57ead7
notebooks: fix setup cell (remove :eprintln); ready for evcxr kernel
springyworks Aug 13, 2025
9658b84
notebooks: fix demo cell (use let binding for first assignment)
springyworks Aug 13, 2025
8a5305b
if u give me the drop-address i will send you cake
springyworks Aug 13, 2025
4b0430b
docs: remove marketing phrasing (professional/production-ready/state-…
springyworks Aug 13, 2025
a79dc58
local commit
springyworks Aug 14, 2025
0e03a6e
test(fft,scan): refine multidim FFT expectations, add GPU FFT c2c smo…
springyworks Aug 14, 2025
1ac0a85
feat(fft): add normalization tests, shared helpers, benchmarks, debug…
springyworks Aug 14, 2025
d3ac96f
chore(fft benches): add large/ratio benches, tolerance rationale, roo…
springyworks Aug 14, 2025
39de210
exploration: add egui_scan_demo + procedural field helpers (meshgrid,…
springyworks Aug 14, 2025
81d6d54
exploration: add checkerboard, value_noise, gaussian_noise, expr_fiel…
springyworks Aug 14, 2025
7775026
notebooks: relocate all ipynb into candle_notebooks crate; remove old…
springyworks Aug 15, 2025
72534cf
notebooks: add tensor_art_gallery visualizations and image_store outputs
springyworks Aug 15, 2025
4ceff12
chore: ignore generated notebook images (images_store) and untrack ex…
springyworks Aug 15, 2025
84a63b6
fix: robust tensor image display and gallery, use captioned helpers, …
springyworks Aug 15, 2025
f0575a3
chore(notebooks): standardize intro/deps/CWD/image-store headers; ded…
springyworks Aug 15, 2025
3b11d82
docs(build): explain native builds (VkFFT, glslang) and how they inte…
springyworks Aug 16, 2025
14ba0fe
docs: add CONTRIBUTING and friendly PR template; clarify fork branch …
springyworks Aug 16, 2025
c31cd74
docs: broaden build README beyond VkFFT (CPU/GPU scan & FFT) and note…
springyworks Aug 16, 2025
01197a0
chore: add PR body file for gh draft PR creation
springyworks Aug 16, 2025
2f610c6
chore(pr): remove bold formatting from draft PR body
springyworks Aug 16, 2025
b7279ec
chore: ignore CMake/Ninja build artifacts and editor caches; untrack …
springyworks Aug 16, 2025
dea343f
docs: prune speculative/off-topic MD; move exploration notes to docs;…
springyworks Aug 16, 2025
8c6ba06
chore: untrack build/ and .cache from VCS; keep build/README.md tracked
springyworks Aug 16, 2025
263c39b
docs: relocate exploration feature notes out of crate (avoid overprom…
springyworks Aug 16, 2025
2096745
docs: move exploration testing guide under docs/; drop internal TODO log
springyworks Aug 16, 2025
6ae5ae3
Reorganize EXPLORATION: separate demos vs research notebooks
springyworks Aug 16, 2025
4c91116
Demos: convert notebooks to Rust (evcxr), remove Python cells; keep r…
springyworks Aug 16, 2025
fa85d8d
FFT demo: align with research notebook setup (deps/cwd via candle-not…
springyworks Aug 16, 2025
9342cee
Notebooks: add Rust kernelspec to scan demo; adopt .rs.ipynb naming c…
springyworks Aug 16, 2025
8bafa58
Polish workspace: resolve syntax errors, binary conflicts, clippy war…
springyworks Aug 16, 2025
1e03ec1
Add README_additions.md and fork notice
springyworks Aug 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Common.h.81EBE6BB9737F670.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Link.cpp.D3F586B588BF3260.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Logger.h.F5149E273327C241.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Pp.cpp.C63F81E549D3EF9D.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Scan.h.0F6F49D451656671.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/SpvTools.h.F8E36C43C1456497.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/Types.h.459241A5B8C22E71.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/arrays.h.0A4F2520589083E1.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/doc.cpp.E0DCD596234B43AA.idx
Binary file not shown.
Binary file added .cache/clangd/index/doc.h.F938F0E464C0F35D.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/pch.h.896DE34ADC6FC2A9.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/spvIR.h.282EBA05D8CCED34.idx
Binary file not shown.
Binary file added .cache/clangd/index/stub.cpp.4729B2A64E0B8599.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .cache/clangd/index/vkFFT.h.1EF16DAA23DD6A73.idx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ rustflags = ["-C", "target-cpu=native"]
rustflags = ["-C", "target-feature=+simd128"]

[target.x86_64-apple-darwin]
rustflags = ["-C", "target-feature=-avx,-avx2"]
rustflags = ["-C", "target-feature=-avx,-avx2"]

[alias]
run-viz = "run -p candle-exploration --features fft --bin tensor_feedback_viz"
run-viz-gpu = "run -p candle-exploration --features 'cuda fft gpu-fft-vkfft-ffi' --bin tensor_feedback_viz"
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Keep research notebooks in repo but exclude from PR diffs
0aEXPLORATION/research/**/*.ipynb -diff linguist-generated
0aEXPLORATION/research/**/*.ipynb.bak -diff linguist-generated
# Treat as binary to avoid merge conflicts on outputs
0aEXPLORATION/research/**/*.ipynb binary
Empty file.
Empty file.
Empty file added .github/PR_BODY_draft.md
Empty file.
Empty file.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
combo: [ "", "cuda", "cuda,fft", "cuda,cudnn", "fft" ]
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Install minimal CUDA dependencies (placeholder)
if: contains(matrix.combo, 'cuda')
run: |
echo "TODO: install CUDA dependencies for CI environment if needed"
- name: Build & test (feature combo)
run: |
if [ "${{ matrix.combo }}" = "" ]; then
cargo test -p candle-exploration --no-run
else
cargo test -p candle-exploration --no-run --features "${{ matrix.combo }}"
fi
- name: Run xtask check + test canonical
if: matrix.combo == ''
run: |
cargo run -p xtask -- check
cargo run -p xtask -- test
43 changes: 43 additions & 0 deletions .github/workflows/nightly-powerset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Nightly Feature Powerset

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch: {}

jobs:
powerset:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run limited powerset checks
run: cargo run -p xtask -- check-all
- name: Run limited powerset tests
run: cargo run -p xtask -- test-all
- name: Advanced core GPU FFT combos (informational, ignore failures)
continue-on-error: true
env:
XTASK_CORE_FFT: "1"
run: |
# Advanced GPU FFT provider stacks:
# * Baseline gpu-fft (alias cuda-fft) plumbing
# * Optional VkFFT layers (gpu-fft-vkfft, gpu-fft-vkfft-ffi)
# Failures ignored to keep nightly green when CUDA toolchain or deps absent.
cargo run -p xtask -- check
- name: candle-core gpu fft test build (non-fatal)
continue-on-error: true
run: |
# Build and run only the minimal gpu fft smoke tests if CUDA available.
# Skip fully running all tests to keep runtime low; focus on early linkage failures.
set -e
echo "Attempting candle-core GPU FFT smoke tests"
if cargo test -p candle-core --no-run --features "cuda,fft,gpu-fft" 2>/dev/null; then
# run filtered tests to limit scope
cargo test -p candle-core --features "cuda,fft,gpu-fft" --test gpu_fft_smoke -- gpu_fft_forward_inverse_roundtrip || true
cargo test -p candle-core --features "cuda,fft,gpu-fft" --test gpu_fft_smoke_complex -- gpu_fft_c2c_roundtrip || true
else
echo "Skipping gpu fft smoke run; build failed or CUDA unavailable"
fi

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ out.wav
bria.mp3
bria.safetensors
bria.wav

# Ignore generated notebook images
0aEXPLORATION/candle_notebooks/images_store/
*.png
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "candle-examples/examples/flash-attn/cutlass"]
path = candle-flash-attn/cutlass
url = https://github.com/NVIDIA/cutlass.git
[submodule "third_party/VkFFT"]
path = third_party/VkFFT
url = https://github.com/DTolm/VkFFT.git
20 changes: 10 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none",
"python.testing.pytestArgs": [
"candle-pyo3"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
"rust-analyzer.procMacro.enable": true,

"rust-analyzer.cargo.noDefaultFeatures": false,
"workbench.colorCustomizations": {
"editor.background": "#010101",
"activityBar.background": "#25302D",
"titleBar.activeBackground": "#34433F",
"titleBar.activeForeground": "#F9FAFA"
}
}
82 changes: 82 additions & 0 deletions 0aEXPLORATION/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[package]
name = "candle-exploration"
version = "0.1.0"
edition = "2021"
default-run = "tensor_feedback_viz"

[dependencies]
candle-core = { path = "../candle-core" }
candle-nn = { path = "../candle-nn" }
candle-transformers = { path = "../candle-transformers" }
fastrand = "2.0"
imageproc = "0.25"
minifb = "0.27"
font8x8 = "0.3"
tokio = { version = "1.0", features = ["full"] }
futures = "0.3"
egui = { version = "0.27", default-features = true }
eframe = { version = "0.27", default-features = true }
meval = { version = "0.2", optional = true }

[features]
default = []
cuda = ["candle-core/cuda", "candle-nn/cuda", "candle-transformers/cuda"]
cudnn = ["candle-core/cudnn", "candle-nn/cudnn", "candle-transformers/cudnn"]
fft = ["candle-core/fft"]
viz-debug = [] # enables additional debug logging paths in tensor_feedback_viz
expr-fields = ["dep:meval"]

[[bin]]
name = "code_overview"
path = "src/bin/code_overview.rs"

[[bin]]
name = "test_higher_dims"
path = "src/bin/test_higher_dims.rs"

[[bin]]
name = "test_custom_types"
path = "src/bin/test_custom_types.rs"

[[bin]]
name = "compound_data_examples"
path = "src/bin/compound_data_examples.rs"

[[bin]]
name = "tensor_feedback_viz"
path = "src/bin/tensor_feedback_viz.rs"
required-features = ["cuda"]

[[bin]]
name = "tensor_feedback_simple"
path = "src/bin/tensor_feedback_simple.rs"
required-features = ["cuda"]

[[bin]]
name = "gpu_tensor_feedback"
path = "src/bin/gpu_tensor_feedback.rs"
required-features = ["cuda"]

[[bin]]
name = "gpu_stream_display"
path = "src/bin/gpu_stream_display.rs"
required-features = ["cuda"]


[[bin]]
name = "fft_overview"
path = "NOT/fft_overview.rs"
required-features = ["fft"]

[[bin]]
name = "gpu_fft2_dual_pane"
path = "src/bin/gpu_fft2_dual_pane.rs"
required-features = ["cuda", "fft"]

[[bin]]
name = "egui_scan_demo"
path = "src/bin/egui_scan_demo.rs"

[[bin]]
name = "test_5d_tensors"
path = "src/bin/test_5d_tensors.rs"
117 changes: 117 additions & 0 deletions 0aEXPLORATION/NOT/fft_overview.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
//! FFT Implementation Files Overview - Lists FFT files with their documentation descriptions
//! Provides an overview of the FFT system implementation across the Candle codebase

use std::fs;
use std::path::Path;

fn main() -> std::io::Result<()> {
println!("🚀 Candle FFT Implementation Overview\n");

let fft_files = vec![
(
"candle-core/src/cpu_backend/cpu_fft.rs",
"Core CPU FFT Implementation",
),
(
"candle-core/src/cuda_backend/cuda_fft.rs",
"Core CUDA FFT Implementation",
),
("candle-kernels/src/fft.cu", "CUDA Kernels"),
("candle-core/tests/fft_tests.rs", "Comprehensive Test Suite"),
(
"candle-core/tests/fft_feature_check.rs",
"Feature Gate Validation",
),
("FEATURE_TESTING.md", "Feature Testing Documentation"),
(
"FFT_IMPLEMENTATION_SUMMARY.md",
"Implementation Status Report",
),
];

for (file_path, category) in fft_files {
let full_path = Path::new("..").join(file_path);

println!("📄 **{file_path}** - *{category}*");

if let Ok(content) = fs::read_to_string(&full_path) {
let lines: Vec<&str> = content.lines().collect();

// Look for the first two //! doc comment lines
let mut doc_lines = Vec::new();
for line in lines.iter().take(15) {
// Check first 15 lines for doc comments
let trimmed = line.trim();
if trimmed.starts_with("//!") {
doc_lines.push(trimmed.trim_start_matches("//!").trim());
} else if trimmed.starts_with("#") && file_path.ends_with(".md") {
// For markdown files, use the first header
doc_lines.push(trimmed.trim_start_matches("#").trim());
break;
} else if !trimmed.is_empty()
&& !trimmed.starts_with("//")
&& !file_path.ends_with(".md")
{
break; // Stop at first non-comment line for source files
}
}

if doc_lines.len() >= 2 {
println!(" ✅ {}", doc_lines[0]);
println!(" ✅ {}", doc_lines[1]);
} else if doc_lines.len() == 1 {
println!(" ✅ {}", doc_lines[0]);
} else {
println!(" ❌ No documentation found");
}
} else {
println!(" ❌ File not found");
}
println!();
}

// Test status summary
println!("🧪 **Test Status Summary**");

let test_cmd = std::process::Command::new("cargo")
.args([
"test",
"--test",
"fft_tests",
"--features",
"fft",
"--",
"--format",
"terse",
])
.current_dir("..")
.output();

match test_cmd {
Ok(output) => {
let output_str = String::from_utf8_lossy(&output.stdout);
if output_str.contains("13 passed; 2 failed") {
println!(" ✅ 13/15 tests passing (87% success rate)");
println!(" 🔧 2 tests remaining: test_cpu_fft_inverse, test_cpu_fft_2d");
} else {
println!(
" 📊 Test status: {}",
output_str.lines().last().unwrap_or("Unknown")
);
}
}
Err(_) => {
println!(" ❓ Run 'cargo test --features fft' to check current status");
}
}

println!("\n🎯 **Available Components:**");
println!(" ✅ 1D FFT operations (real and complex)");
println!(" ✅ Multi-dimensional FFT operations");
println!(" ✅ CUDA GPU acceleration");
println!(" ✅ Feature gate system and user protection");
println!(" ✅ Documentation and tests");
println!(" ✅ Windowing functions and spectral analysis");

Ok(())
}
Loading