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

upgrade jsep cast operator #22594

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions onnxruntime/core/providers/js/js_execution_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ class ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 1, Not)
class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 6, 8, Cast);
class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 9, 12, Cast);
class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 13, 18, Cast);
class ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 19, Cast);
class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 19, 20, Cast);
class ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 21, Cast);

class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 6, 10, Clip);
class ONNX_OPERATOR_VERSIONED_KERNEL_CLASS_NAME(kJsExecutionProvider, kOnnxDomain, 11, 11, Clip);
Expand Down Expand Up @@ -439,7 +440,8 @@ std::unique_ptr<KernelRegistry> RegisterKernels() {
KERNEL_CREATE_INFO_VERSIONED(6, 8, Cast),
KERNEL_CREATE_INFO_VERSIONED(9, 12, Cast),
KERNEL_CREATE_INFO_VERSIONED(13, 18, Cast),
KERNEL_CREATE_INFO(19, Cast),
KERNEL_CREATE_INFO_VERSIONED(19, 20, Cast),
KERNEL_CREATE_INFO(21, Cast),

// activations
KERNEL_CREATE_INFO_VERSIONED(6, 10, Clip),
Expand Down
11 changes: 10 additions & 1 deletion onnxruntime/core/providers/js/operators/cast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@
.TypeConstraint("T1", CastOpTypeConstraints())
.TypeConstraint("T2", CastOpTypeConstraints()),
Cast);
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Cast,

Check warning on line 53 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:53: Do not indent within a namespace. [whitespace/indent_namespace] [4]
kOnnxDomain,

Check warning on line 54 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:54: Do not indent within a namespace. [whitespace/indent_namespace] [4]
19, 20,

Check warning on line 55 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:55: Do not indent within a namespace. [whitespace/indent_namespace] [4]
kJsExecutionProvider,

Check warning on line 56 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:56: Do not indent within a namespace. [whitespace/indent_namespace] [4]
(*KernelDefBuilder::Create())

Check warning on line 57 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:57: Do not indent within a namespace. [whitespace/indent_namespace] [4]
.TypeConstraint("T1", CastOpTypeConstraints())

Check warning on line 58 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:58: Do not indent within a namespace. [whitespace/indent_namespace] [4]
.TypeConstraint("T2", CastOpTypeConstraints()),

Check warning on line 59 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:59: Do not indent within a namespace. [whitespace/indent_namespace] [4]
Cast);

Check warning on line 60 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:60: Do not indent within a namespace. [whitespace/indent_namespace] [4]
ONNX_OPERATOR_KERNEL_EX(
Cast,
kOnnxDomain,
19,
21,

Check warning on line 64 in onnxruntime/core/providers/js/operators/cast.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Do not indent within a namespace. [whitespace/indent_namespace] [4] Raw Output: onnxruntime/core/providers/js/operators/cast.cc:64: Do not indent within a namespace. [whitespace/indent_namespace] [4]
kJsExecutionProvider,
(*KernelDefBuilder::Create())
.TypeConstraint("T1", CastOpTypeConstraints())
Expand Down
Loading