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

Add tolerance args to CheckONNXModel.py #3024

Merged

Conversation

AlexandreEichenberger
Copy link
Collaborator

Added --rtol=x and --atol=y to CheckONNXModel.py.

So for example, if you wanted to check the accuracy of a code running on CPU vs accelerator, you would launch the following command

CheckONNXModel.py -m <model> -r="-O3 -march=z16" -a="-maccel=NNPA" -atol=0.001 -rtol=0.005

where -m is to give the model name, -r is the reference compile parameters, -a is the additional parameters to be tested for the test compilation (you can use the -t to give an entirely different compiler options), and the last 2 parameters are used to pass the absolute and relative tolerance used to verify the equivalence of the reference-compiled-run vs test-compiled-run.

Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Copy link
Collaborator

@hamptonm1 hamptonm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlexandreEichenberger AlexandreEichenberger merged commit 32d2c8b into onnx:main Dec 6, 2024
7 checks passed
@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #16062 [push] Add tolerance args to Ch... started at 19:55

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #16060 [push] Add tolerance args to Ch... started at 18:55

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #15089 [push] Add tolerance args to Ch... started at 20:11

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #16060 [push] Add tolerance args to Ch... passed after 1 hr 21 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #16062 [push] Add tolerance args to Ch... passed after 1 hr 28 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #15089 [push] Add tolerance args to Ch... passed after 2 hr 34 min

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