Skip to content

Conversation

@skottmckay
Copy link
Contributor

Description:
Add type reduction support to Slice and Transpose kernels.

Motivation and Context
Reduce binary size.

@skottmckay skottmckay requested a review from a team as a code owner February 3, 2021 08:31
@skottmckay skottmckay requested a review from edgchen1 February 3, 2021 10:37
@yuslepukhin
Copy link
Member

// Licensed under the MIT License.

Does not seem to contain any changes


Refers to: include/onnxruntime/core/framework/data_types_internal.h:2 in b0f2a07. [](commit_id = b0f2a07, deletion_comment = False)

@yuslepukhin
Copy link
Member

  • Provides a type list of enabled types via the 'types' data member.

type member?


Refers to: onnxruntime/core/providers/op_kernel_type_control.h:72 in b0f2a07. [](commit_id = b0f2a07, deletion_comment = False)

}

template <typename EnabledTypes, typename T>
static inline bool CallSliceImplIfEnabled(OpKernelContext* ctx,
Copy link
Contributor

@edgchen1 edgchen1 Feb 3, 2021

Choose a reason for hiding this comment

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

CallSliceImplIfEnabled [](start = 19, length = 22)

wonder if this can be extended to call arbitrary enable-able code with a lambda... #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

generic lambdas were c++14 and we're currently stuck at c++11, so I didn't think doing it as a lambda was possible.


In reply to: 569695618 [](ancestors = 569695618)

@skottmckay
Copy link
Contributor Author

// Licensed under the MIT License.

clang-format fixed some whitespace


In reply to: 772659031 [](ancestors = 772659031)


Refers to: include/onnxruntime/core/framework/data_types_internal.h:2 in b0f2a07. [](commit_id = b0f2a07, deletion_comment = False)

Copy link
Contributor

@edgchen1 edgchen1 left a comment

Choose a reason for hiding this comment

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

:shipit:

@skottmckay skottmckay merged commit c49d1db into master Feb 5, 2021
@skottmckay skottmckay deleted the skottmckay/TypeReductionSupportForSliceAndTranspose branch February 5, 2021 01:08
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