feat: update workspace paths and enhance gitignore

- Updated stablediffusion crate path from "../stable-diffusion-burn" to "./crates/stable-diffusion-burn" for proper workspace resolution
- Enhanced .gitignore to include generated model files (.mpk, .pt, .bin, .safetensors, .ckpt) and user_data directory
- Added Cargo.lock to gitignore with appropriate comment
- Reorganized IDE files section in gitignore for better clarity
- Added newline at end of file for proper formatting
This commit is contained in:
2026-03-05 19:39:14 +01:00
parent 4bb7ca9074
commit 3a67c0979c
1605 changed files with 537032 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
// Burn autodiff tests, reusable with element types.
pub use super::*;
#[path = "../autodiff/mod.rs"]
mod base;
mod checkpointing {
pub use super::*;
use burn_autodiff::checkpoint::strategy::BalancedCheckpointing;
// Override type def
pub type TestAutodiffBackend = Autodiff<TestBackend, BalancedCheckpointing>;
pub type TestAutodiffTensor<const D: usize> = Tensor<TestAutodiffBackend, D>;
include!("../autodiff/mod.rs");
}
use burn_backend_tests::test_float_elem_variant;
// NOTE: this currently doesn't test checkpointing with different dtypes
test_float_elem_variant!(
f16,
burn_tensor::f16,
"../autodiff/mod.rs",
["vulkan", "cuda", "rocm", "metal"]
);
// TODO: bf16 not yet supported on any backend for full test suite
// test_float_elem_variant!(
// bf16,
// burn_tensor::bf16,
// "../autodiff/mod.rs",
// [] // ["cuda", "rocm"] TODO, ["vulkan"] only supports bf16 for matmul, metal/wgpu doesn't support bf16
// );

View File

@@ -0,0 +1,47 @@
// Re-export
use super::FloatElemType;
// Default
#[cfg(feature = "ndarray")]
pub type TestBackend = burn_ndarray::NdArray<FloatElemType>;
#[cfg(feature = "tch")]
pub type TestBackend = burn_tch::LibTorch<FloatElemType>;
#[cfg(feature = "cuda")]
pub type TestBackend = burn_cuda::Cuda<FloatElemType, super::IntElemType>;
#[cfg(feature = "rocm")]
pub type TestBackend = burn_rocm::Rocm<FloatElemType, super::IntElemType>;
#[cfg(feature = "wgpu")]
pub type TestBackend = burn_wgpu::Wgpu<FloatElemType, super::IntElemType>;
#[cfg(feature = "cpu")]
pub type TestBackend = burn_cpu::Cpu<FloatElemType, super::IntElemType>;
#[cfg(feature = "router")]
pub type TestBackend = burn_router::BackendRouter<
burn_router::DirectByteChannel<(burn_ndarray::NdArray, burn_wgpu::Wgpu)>,
>;
/// Collection of types used across tests
#[allow(unused)]
pub mod prelude {
pub use burn_autodiff::Autodiff;
pub use burn_tensor::Tensor;
use super::*;
pub type TestTensor<const D: usize> = Tensor<TestBackend, D>;
pub type TestTensorInt<const D: usize> = Tensor<TestBackend, D, burn_tensor::Int>;
pub type TestTensorBool<const D: usize> = Tensor<TestBackend, D, burn_tensor::Bool>;
pub type FloatElem = burn_tensor::ops::FloatElem<TestBackend>;
pub type IntElem = burn_tensor::ops::IntElem<TestBackend>;
pub type TestAutodiffBackend = Autodiff<TestBackend>;
pub type TestAutodiffTensor<const D: usize> = Tensor<TestAutodiffBackend, D>;
}
#[allow(unused)]
pub use prelude::*;

View File

@@ -0,0 +1,39 @@
// Burn backend tensor tests, reusable with element types.
pub use super::*;
#[path = "../tensor/clone_invariance.rs"]
mod clone_invariance;
#[cfg(feature = "std")]
#[path = "../tensor/multi_threads.rs"]
mod multi_threads;
// Default float dtype
#[path = "../tensor/float/mod.rs"]
mod float;
// Default integer dtype
#[path = "../tensor/int/mod.rs"]
mod int;
// Default bool dtype
#[path = "../tensor/bool/mod.rs"]
mod bool;
use burn_backend_tests::test_float_elem_variant;
test_float_elem_variant!(
f16,
burn_tensor::f16,
"../tensor/float/mod.rs",
["vulkan", "cuda", "rocm", "metal"]
);
// TODO: bf16 not yet supported on any backend for full test suite
// test_float_elem_variant!(
// bf16,
// burn_tensor::bf16,
// "../tensor/float/mod.rs",
// [] // ["cuda", "rocm"] TODO, ["vulkan"] only supports bf16 for matmul, metal/wgpu doesn't support bf16
// );