Skip to content

Conversation

@edgchen1
Copy link
Contributor

@edgchen1 edgchen1 commented Feb 9, 2021

Description
Move ORT_ENFORCE()'s within MLTypeCallDispatcher to helper class functions to reduce the size of function names in ORT_ENFORCE().
ORT_ENFORCE() captures the containing function's name in the error message. For some usages of MLTypeCallDispatcher (i.e., with numerous types or long type names), the function name is quite long and can contribute significantly to the binary size. Usage in the Cast CPU kernel is a notable example.
This change moves the ORT_ENFORCE() checks from a class template member function template with variable length name to a helper function with a fixed length name.

Motivation and Context
Reduce binary size.

…tions to reduce the size used by function names in ORT_ENFORCE().
@edgchen1 edgchen1 requested a review from a team as a code owner February 9, 2021 21:14
@snnn
Copy link
Contributor

snnn commented Feb 10, 2021

/azp run Windows CPU CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@edgchen1 edgchen1 merged commit 352e8cb into master Feb 10, 2021
@edgchen1 edgchen1 deleted the edgchen1/mltypecalldispatcher_size_reduction branch February 10, 2021 19:34
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.

4 participants