Skip to content

Conversation

@justinchuby
Copy link
Contributor

Register SimplifiedLayerNormalization to MS domain. Previously it was incorrectly registered to the ONNX domain, causing onnx models to be invalid.

Fix #7573

Register SimplifiedLayerNormalization to MS domain. Previously it was incorrectly registered to the ONNX domain, causing onnx models to be invalid.
@justinchuby
Copy link
Contributor Author

justinchuby commented Sep 12, 2025

There are errors

cuda_contrib_kernels.obj : error LNK2001: unresolved external symbol "struct onnxruntime::KernelCreateInfo __cdecl onnxruntime::contrib::cuda::BuildKernelCreateInfo<class onnxruntime::contrib::cuda::kCudaExecutionProvider_SimplifiedLayerNormalization_kMSDomain_ver1_float_float_float>(void)" (??$BuildKernelCreateInfo@VkCudaExecutionProvider_SimplifiedLayerNormalization_kMSDomain_ver1_float_float_float@cuda@contrib@onnxruntime@@@cuda@contrib@onnxruntime@@YA?AUKernelCreateInfo@2@XZ) [E:\_work\_temp\build\RelWithDebInfo\onnxruntime_providers_cuda.vcxproj]

Is it the way I registered the ops?

class ONNX_OPERATOR_KERNEL_CLASS_NAME(kWebGpuExecutionProvider, kMSDomain, 1, SimplifiedLayerNormalization);
class ONNX_OPERATOR_KERNEL_CLASS_NAME(kWebGpuExecutionProvider, kOnnxDomain, 1, SimplifiedLayerNormalization);
class ONNX_OPERATOR_KERNEL_CLASS_NAME(kWebGpuExecutionProvider, kMSDomain, 1, SkipLayerNormalization);
class ONNX_OPERATOR_KERNEL_CLASS_NAME(kWebGpuExecutionProvider, kOnnxDomain, 1, SimplifiedLayerNormalization);
Copy link
Contributor Author

@justinchuby justinchuby Sep 15, 2025

Choose a reason for hiding this comment

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

@fs-eire I found a duplicated entry. Do you think it was intended to be something else?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

BuildKernelCreateInfo<ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSDomain, 1, RotaryEmbedding)>,
BuildKernelCreateInfo<ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSDomain, 1,
SkipLayerNormalization)>,
BuildKernelCreateInfo<ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSDomain, 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
BuildKernelCreateInfo<ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSDomain, 1,
BuildKernelCreateInfo<ONNX_OPERATOR_KERNEL_CLASS_NAME(kJsExecutionProvider, kMSDomain, 1,

@fs-eire
Copy link
Contributor

fs-eire commented Oct 22, 2025

Is there any following up for this PR?

@justinchuby
Copy link
Contributor Author

I still want to merge but there’s some build errors I don’t understand. Any pointers you can share?

@fs-eire
Copy link
Contributor

fs-eire commented Oct 22, 2025

maybe merge to latest main and check latest error message (if any)? the current code is a little bit out of date

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.

LayerNormalization operator is not in onnx domain

3 participants