Constant tensor support in burn-import #4882
Annotations
8 errors and 1 warning
crates/burn-import/src/burn/graph.rs#L18
[clippy] reported by reviewdog 🐶
error: unused import: `process::exit`
--> crates/burn-import/src/burn/graph.rs:18:79
|
18 | any::type_name, collections::HashMap, marker::PhantomData, path::PathBuf, process::exit,
| ^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
Raw Output:
crates/burn-import/src/burn/graph.rs:18:79:e:error: unused import: `process::exit`
--> crates/burn-import/src/burn/graph.rs:18:79
|
18 | any::type_name, collections::HashMap, marker::PhantomData, path::PathBuf, process::exit,
| ^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
__END__
|
crates/burn-import/src/burn/ty.rs#L1
[clippy] reported by reviewdog 🐶
error: unused import: `std::slice::ChunksExact`
--> crates/burn-import/src/burn/ty.rs:1:5
|
1 | use std::slice::ChunksExact;
| ^^^^^^^^^^^^^^^^^^^^^^^
Raw Output:
crates/burn-import/src/burn/ty.rs:1:5:e:error: unused import: `std::slice::ChunksExact`
--> crates/burn-import/src/burn/ty.rs:1:5
|
1 | use std::slice::ChunksExact;
| ^^^^^^^^^^^^^^^^^^^^^^^
__END__
|
crates/burn-import/src/burn/ty.rs#L3
[clippy] reported by reviewdog 🐶
error: unused import: `half::f16`
--> crates/burn-import/src/burn/ty.rs:3:5
|
3 | use half::f16;
| ^^^^^^^^^
Raw Output:
crates/burn-import/src/burn/ty.rs:3:5:e:error: unused import: `half::f16`
--> crates/burn-import/src/burn/ty.rs:3:5
|
3 | use half::f16;
| ^^^^^^^^^
__END__
|
crates/burn-import/src/burn/ty.rs#L30
[clippy] reported by reviewdog 🐶
error: method `len` is never used
--> crates/burn-import/src/burn/ty.rs:31:8
|
30 | impl TensorData {
| --------------- method in this implementation
31 | fn len(&self) -> usize {
| ^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
Raw Output:
crates/burn-import/src/burn/ty.rs:30:1:e:error: method `len` is never used
--> crates/burn-import/src/burn/ty.rs:31:8
|
30 | impl TensorData {
| --------------- method in this implementation
31 | fn len(&self) -> usize {
| ^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
__END__
|
crates/burn-import/src/burn/scope.rs#L26
[clippy] reported by reviewdog 🐶
error: unneeded `return` statement
--> crates/burn-import/src/burn/scope.rs:26:42
|
26 | variable.references += 1;
| __________________________________________^
27 | | return;
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
26 - variable.references += 1;
27 - return;
26 + variable.references += 1;
|
Raw Output:
crates/burn-import/src/burn/scope.rs:26:42:e:error: unneeded `return` statement
--> crates/burn-import/src/burn/scope.rs:26:42
|
26 | variable.references += 1;
| __________________________________________^
27 | | return;
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
26 - variable.references += 1;
27 - return;
26 + variable.references += 1;
|
__END__
|
crates/burn-import/src/burn/scope.rs#L55
[clippy] reported by reviewdog 🐶
error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-import/src/burn/scope.rs:55:43
|
55 | self.tensor_register_variable(&tensor, node_position);
| ^^^^^^^ help: change this to: `tensor`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
Raw Output:
crates/burn-import/src/burn/scope.rs:55:43:e:error: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/burn-import/src/burn/scope.rs:55:43
|
55 | self.tensor_register_variable(&tensor, node_position);
| ^^^^^^^ help: change this to: `tensor`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
__END__
|
crates/burn-import/src/burn/ty.rs#L284
[clippy] reported by reviewdog 🐶
error: unneeded `return` statement
--> crates/burn-import/src/burn/ty.rs:284:17
|
284 | return self.tensor_internal(self.render_row(&result));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
284 - return self.tensor_internal(self.render_row(&result));
284 + self.tensor_internal(self.render_row(&result))
|
Raw Output:
crates/burn-import/src/burn/ty.rs:284:17:e:error: unneeded `return` statement
--> crates/burn-import/src/burn/ty.rs:284:17
|
284 | return self.tensor_internal(self.render_row(&result));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
284 - return self.tensor_internal(self.render_row(&result));
284 + self.tensor_internal(self.render_row(&result))
|
__END__
|
crates/burn-import/src/burn/ty.rs#L303
[clippy] reported by reviewdog 🐶
error: unneeded `return` statement
--> crates/burn-import/src/burn/ty.rs:303:9
|
303 | / return match self.kind {
304 | | TensorKind::Int => quote! {
305 | | Tensor::<B,#dim>::from_ints(#tok, &self.device)
306 | | },
... |
312 | | },
313 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
303 ~ match self.kind {
304 + TensorKind::Int => quote! {
305 + Tensor::<B,#dim>::from_ints(#tok, &self.device)
306 + },
307 + TensorKind::Float => quote! {
308 + Tensor::<B,#dim>::from_floats(#tok,&self.device)
309 + },
310 + TensorKind::Bool => quote! {
311 + Tensor::<B,#dim>::from_data(#tok, &self.device)
312 + },
313 ~ }
|
Raw Output:
crates/burn-import/src/burn/ty.rs:303:9:e:error: unneeded `return` statement
--> crates/burn-import/src/burn/ty.rs:303:9
|
303 | / return match self.kind {
304 | | TensorKind::Int => quote! {
305 | | Tensor::<B,#dim>::from_ints(#tok, &self.device)
306 | | },
... |
312 | | },
313 | | };
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
303 ~ match self.kind {
304 + TensorKind::Int => quote! {
305 + Tensor::<B,#dim>::from_ints(#tok, &self.device)
306 + },
307 + TensorKind::Float => quote! {
308 + Tensor::<B,#dim>::from_floats(#tok,&self.device)
309 + },
310 + TensorKind::Bool => quote! {
311 + Tensor::<B,#dim>::from_data(#tok, &self.device)
312 + },
313 ~ }
|
__END__
|
The following actions uses Node.js version which is deprecated and will be forced to run on node20: giraffate/clippy-action@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
The logs for this run have expired and are no longer available.
Loading