- 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
42 lines
1.2 KiB
Rust
42 lines
1.2 KiB
Rust
//! Burn tensor and autodiff tests for CubeCL backends with fusion enabled.
|
|
|
|
#![allow(
|
|
clippy::single_range_in_vec_init,
|
|
clippy::duplicate_mod,
|
|
reason = "false positive"
|
|
)]
|
|
extern crate alloc;
|
|
|
|
#[cfg(feature = "cube")]
|
|
#[path = "."]
|
|
mod fusion {
|
|
pub type FloatElemType = f32;
|
|
pub type IntElemType = i32;
|
|
|
|
#[path = "common/backend.rs"]
|
|
mod backend;
|
|
pub use backend::prelude::*;
|
|
|
|
// NOTE:
|
|
// We re-include the tensor and autodiff test suites after overriding `TestBackend`
|
|
// with `Fusion<TestBackend>`. This intentionally duplicates module names and test
|
|
// logic to execute the same tests under fusion.
|
|
pub type TestBackend = burn_fusion::Fusion<backend::TestBackend>;
|
|
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>;
|
|
|
|
// Tensor tests
|
|
mod tensor {
|
|
include!("common/tensor.rs");
|
|
}
|
|
|
|
// Autodiff tests
|
|
mod autodiff {
|
|
include!("common/autodiff.rs");
|
|
}
|
|
|
|
// Fusion tests
|
|
include!("fused_ops/mod.rs");
|
|
}
|