mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
Custom ops with a single argument (#214)
* Add the CustomOp1 trait. * Add an example of custom op. * Polish the custom op example. * Add some backward pass test for custom ops.
This commit is contained in:
@ -33,13 +33,13 @@
|
||||
//!
|
||||
//! Rust is cool, and a lot of the HF ecosystem already has Rust crates [safetensors](https://github.com/huggingface/safetensors) and [tokenizers](https://github.com/huggingface/tokenizers)
|
||||
|
||||
mod backend;
|
||||
pub mod backend;
|
||||
mod backprop;
|
||||
mod conv;
|
||||
mod convert;
|
||||
mod cpu_backend;
|
||||
pub mod cpu_backend;
|
||||
#[cfg(feature = "cuda")]
|
||||
mod cuda_backend;
|
||||
pub mod cuda_backend;
|
||||
mod device;
|
||||
pub mod display;
|
||||
mod dtype;
|
||||
@ -65,6 +65,7 @@ pub use dtype::{DType, WithDType};
|
||||
pub use error::{Error, Result};
|
||||
pub use indexer::IndexOp;
|
||||
pub use layout::Layout;
|
||||
pub use op::CustomOp1;
|
||||
pub use shape::{Shape, D};
|
||||
pub use storage::Storage;
|
||||
pub use strided_index::{StridedBlocks, StridedIndex};
|
||||
|
Reference in New Issue
Block a user