Skip to main content

execute_binary_op_with_fallback

Function execute_binary_op_with_fallback 

Source
pub fn execute_binary_op_with_fallback<T, F>(
    operation_name: &str,
    tensor_a: &Tensor<T>,
    tensor_b: &Tensor<T>,
    gpu_op: F,
    cpu_op: F,
) -> Result<Tensor<T>>
where T: Clone + Default + Zero + One + Send + Sync + 'static + Pod, F: Fn(&Tensor<T>, &Tensor<T>) -> Result<Tensor<T>>,
Expand description

Execute a binary operation with automatic fallback