Skip to content

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
favilo committed Nov 27, 2023
1 parent 32da97a commit 806a607
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion dfdx-core/src/tensor/webgpu/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ impl Buffer {
slice.map_async(wgpu::MapMode::Read, move |_| {
sender.send(()).unwrap();
});
// queue.submit(std::iter::empty());
dev.poll(Maintain::Wait);

let _ = receiver.recv().unwrap();
Expand Down
7 changes: 5 additions & 2 deletions dfdx-core/src/tensor_ops/div/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::borrow::Cow;

use crate::prelude::{ops::{UnaryKernel, BinaryKernel}, Dtype, Webgpu};
use crate::prelude::{
ops::{BinaryKernel, UnaryKernel},
Dtype, Webgpu,
};

impl<E: Dtype> UnaryKernel<super::ScalarDivKernelOp<E>, E> for Webgpu {
const BACKWARD_WITHOUT_INP: bool = false;
Expand All @@ -27,7 +30,7 @@ impl<E: Dtype> UnaryKernel<super::ScalarDivKernelOp<E>, E> for Webgpu {
}
}

impl <E:Dtype> BinaryKernel<super::BinaryDivKernelOp, E> for Webgpu {
impl<E: Dtype> BinaryKernel<super::BinaryDivKernelOp, E> for Webgpu {
const BACKWARD_WITHOUT_DATA: bool = true;

fn forward<S: crate::prelude::Shape>(
Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/huber_error/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ impl<E: Dtype> BinaryKernel<super::HuberErrorKernelOp<E>, E> for Webgpu {
todo!()
}
}

1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/ln/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ impl<E: Dtype> UnaryKernel<super::LnKernelOp, E> for Webgpu {
todo!()
}
}

1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/maximum/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::prelude::{ops::BinaryKernel, Dtype, Webgpu};
use std::borrow::Cow;

Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/minimum/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::prelude::{ops::BinaryKernel, Dtype, Webgpu};
use std::borrow::Cow;

Expand Down
7 changes: 5 additions & 2 deletions dfdx-core/src/tensor_ops/mul/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::borrow::Cow;

use crate::prelude::{ops::{UnaryKernel, BinaryKernel}, Dtype, Webgpu};
use crate::prelude::{
ops::{BinaryKernel, UnaryKernel},
Dtype, Webgpu,
};

impl<E: Dtype> UnaryKernel<super::ScalarMulKernelOp<E>, E> for Webgpu {
const BACKWARD_WITHOUT_INP: bool = false;
Expand All @@ -27,7 +30,7 @@ impl<E: Dtype> UnaryKernel<super::ScalarMulKernelOp<E>, E> for Webgpu {
}
}

impl <E:Dtype> BinaryKernel<super::BinaryMulKernelOp, E> for Webgpu {
impl<E: Dtype> BinaryKernel<super::BinaryMulKernelOp, E> for Webgpu {
const BACKWARD_WITHOUT_DATA: bool = true;

fn forward<S: crate::prelude::Shape>(
Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/nans_to/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ impl<E: Dtype> UnaryKernel<super::NansToKernelOp<E>, E> for Webgpu {
todo!()
}
}

2 changes: 1 addition & 1 deletion dfdx-core/src/tensor_ops/roll/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::prelude::{Dtype, Webgpu};

impl<E: Dtype> super::RollKernel<E> for Webgpu{
impl<E: Dtype> super::RollKernel<E> for Webgpu {
fn forward<S: crate::prelude::Shape>(
&self,
op: super::RollOp,
Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/sin/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ impl<E: Dtype> UnaryKernel<super::SinKernelOp, E> for Webgpu {
todo!()
}
}

1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/sqrt/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use std::borrow::Cow;

use crate::prelude::{ops::UnaryKernel, Dtype, Webgpu};
Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/square/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ impl<E: Dtype> UnaryKernel<super::SquareKernelOp, E> for Webgpu {
todo!()
}
}

7 changes: 5 additions & 2 deletions dfdx-core/src/tensor_ops/sub/webgpu_kernel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::borrow::Cow;

use crate::prelude::{ops::{UnaryKernel, BinaryKernel}, Dtype, Webgpu};
use crate::prelude::{
ops::{BinaryKernel, UnaryKernel},
Dtype, Webgpu,
};

impl<E: Dtype> UnaryKernel<super::ScalarSubKernelOp<E>, E> for Webgpu {
const BACKWARD_WITHOUT_INP: bool = false;
Expand All @@ -27,7 +30,7 @@ impl<E: Dtype> UnaryKernel<super::ScalarSubKernelOp<E>, E> for Webgpu {
}
}

impl <E:Dtype> BinaryKernel<super::BinarySubKernelOp, E> for Webgpu {
impl<E: Dtype> BinaryKernel<super::BinarySubKernelOp, E> for Webgpu {
const BACKWARD_WITHOUT_DATA: bool = true;

fn forward<S: crate::prelude::Shape>(
Expand Down
1 change: 0 additions & 1 deletion dfdx-core/src/tensor_ops/tanh/webgpu_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ impl<E: Dtype> UnaryKernel<super::TanhKernelOp, E> for Webgpu {
todo!()
}
}

0 comments on commit 806a607

Please sign in to comment.