-
Notifications
You must be signed in to change notification settings - Fork 699
[Feature] reduce fuse on read #2870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 35 commits
cf625c1
f896944
af32941
762ae7f
ab343b0
c359c89
8cd6acc
416e220
1a7e61d
1919dc2
ca549e5
6fe9aa1
e3d8017
a4efa79
1fd3cd0
0c1b90d
6aeb2f1
933652a
88e202a
4491690
9b42fa8
2f97206
a4b6afa
11cb906
04b78a8
e2fa98d
601e094
b89bb62
9aad422
e464142
0a28d83
8c80064
11b746c
e1b0039
4264ffb
a6d8fd6
466485d
c736943
f9b9e98
05dfd4a
e0da405
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,11 @@ impl<B: Backend> Benchmark for ReduceBenchmark<B> { | |
self.tensor.clone().argmin(axis); | ||
} | ||
Instruction::SumDim(axis) => { | ||
self.tensor.clone().sum_dim(axis); | ||
let tensor = self.tensor.clone() + 5; | ||
let tensor = tensor.log(); | ||
let tensor = tensor.tanh(); | ||
let tensor = tensor * 3; | ||
tensor.sum_dim(axis); | ||
} | ||
Instruction::Sum => { | ||
self.tensor.clone().sum(); | ||
|
@@ -74,18 +78,18 @@ fn bench<B: Backend>( | |
let mut benchmarks = Vec::new(); | ||
|
||
for axis in 0..3 { | ||
benchmarks.push(ReduceBenchmark::<B>::new( | ||
Instruction::ArgMin(axis), | ||
device.clone(), | ||
)); | ||
// benchmarks.push(ReduceBenchmark::<B>::new( | ||
// Instruction::ArgMin(axis), | ||
// device.clone(), | ||
// )); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uncomment? |
||
|
||
benchmarks.push(ReduceBenchmark::<B>::new( | ||
Instruction::SumDim(axis), | ||
device.clone(), | ||
)); | ||
} | ||
|
||
benchmarks.push(ReduceBenchmark::<B>::new(Instruction::Sum, device.clone())); | ||
// benchmarks.push(ReduceBenchmark::<B>::new(Instruction::Sum, device.clone())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uncomment? |
||
|
||
save::<B>( | ||
benchmarks.into_iter().map(run_benchmark).collect(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug changes? Curious what issue you were trying to track/fix by introducing the additional ops before the reduce 😄