mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Parallelize Max (#16745)
It gives up to 7.5% improvement in LLaMA 7B case.
This commit is contained in:
parent
24566058b3
commit
6e895fe70a
1 changed files with 6 additions and 1 deletions
|
|
@ -855,7 +855,12 @@ struct Max_8::ComputeImpl {
|
|||
}};
|
||||
|
||||
int input_count = inst.Node().InputArgCount().front();
|
||||
UntypedBroadcastVariadic(input_count, *context, typed_allocator, funcs);
|
||||
// TODO: Parallelize across spans in UntypedBroadcastVariadic to avoid specific logic here
|
||||
if (input_count == 2) {
|
||||
UntypedBroadcastTwo(*context, funcs, 1.0);
|
||||
} else {
|
||||
UntypedBroadcastVariadic(input_count, *context, typed_allocator, funcs);
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue