Skip to content
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

llvm, mechanism: Eliminate redundant copies of port input data #2336

Merged
merged 13 commits into from
Mar 10, 2022

Conversation

jvesely
Copy link
Collaborator

@jvesely jvesely commented Mar 10, 2022

Ports that are not modulated can directly use input data in its original location instead of creating a new copy.
Modulated ports still need a copy to create unified data+modulation input.
This saves ~12% of memory traffic in mechanism execution.

Add port modulation tests.

The types determines copy size, 'int' is secondary.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
NFC. Potentialy faster execution postponing expensive 'isinstance' call.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Port inputs are constructed by combining input data and modulations
in one structure. This is the case for all types of ports
(input, output, parameter), since all can be modulated.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Drop exception path, exception handling is expensive.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Drop extra struct from the input type if there's no modulation.
This allows us to use data inputs directly without creating an extra
copy for port input.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
OCM extracts 'optimal_samples' before returning its value,
do that before calling the generic parser routine.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
@jvesely jvesely added the compiler Runtime Compiler label Mar 10, 2022
@jvesely jvesely changed the title llvm, mechanism: Eliminated redundant copies of port input data llvm, mechanism: Eliminate redundant copies of port input data Mar 10, 2022
@github-actions
Copy link

This PR causes the following changes to the html docs (ubuntu-latest-3.7-x64):

No differences!

...

See CI logs for the full diff.

@jvesely jvesely merged commit d6412e1 into PrincetonUniversity:devel Mar 10, 2022
@jvesely jvesely added this to In progress in LLVM Runtime Compiler via automation Mar 11, 2022
@jvesely jvesely moved this from In progress to Done in LLVM Runtime Compiler Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Runtime Compiler
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant