Skip to content

Eliminate hashmap copies during function inlining#17439

Merged
yuslepukhin merged 3 commits intomainfrom
yuslepukhin/eliminate_map_copy
Sep 7, 2023
Merged

Eliminate hashmap copies during function inlining#17439
yuslepukhin merged 3 commits intomainfrom
yuslepukhin/eliminate_map_copy

Conversation

@yuslepukhin
Copy link
Member

@yuslepukhin yuslepukhin commented Sep 6, 2023

Description

Eliminate unnecessary HashMap copies. This saves 22% of CPU usage on a reference Dynamo exported model.

Motivation and Context

Our function inlining is currently slow.

Before:

image

After

image

  Eliminate empty_map and pass nullptr as a default argument.
gramalingam
gramalingam previously approved these changes Sep 7, 2023
@yuslepukhin yuslepukhin merged commit 21c202b into main Sep 7, 2023
@yuslepukhin yuslepukhin deleted the yuslepukhin/eliminate_map_copy branch September 7, 2023 21:08
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
### Description
Eliminate unnecessary HashMap copies. This saves 22% of CPU usage on a
reference Dynamo exported model.

### Motivation and Context
Our function inlining is currently slow.

Before:


![image](https://github.com/microsoft/onnxruntime/assets/11303988/fd38a857-8c12-42ef-9de2-3485123a9fe7)

After


![image](https://github.com/microsoft/onnxruntime/assets/11303988/ea65813d-26cb-41dc-ba55-6a609b169767)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants