Skip to content

coreml: Fix Gather fp16 support#26442

Merged
edgchen1 merged 8 commits into
microsoft:mainfrom
borg323:coreml-gather-fp16
Jan 12, 2026
Merged

coreml: Fix Gather fp16 support#26442
edgchen1 merged 8 commits into
microsoft:mainfrom
borg323:coreml-gather-fp16

Conversation

@borg323
Copy link
Copy Markdown
Contributor

@borg323 borg323 commented Oct 29, 2025

Description

The coreml gather MLProgram operator supports fp16, but the check was missing in GatherOpBuilder::HasSupportedInputsImpl()

Motivation and Context

We use Gather in LeelaChessZero.

@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Nov 3, 2025

Is anything else needed for this?

@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Nov 7, 2025

Should I merge with master to pick f49ae6f?

@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Nov 20, 2025

@snnn is there anything else needed for this?

@snnn snnn requested a review from edgchen1 November 20, 2025 18:26
@snnn snnn added the ep:CoreML issues related to CoreML execution provider label Nov 20, 2025
@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Dec 2, 2025

Ping

@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Dec 17, 2025

@edgchen1 or @snnn can you please take a look? This is a one-liner that just adds documented support for fp16 to Gather and it is a considerable speed improvement for us.
The previous CI build only failed due to an unrelated Linux CI issue.

Comment thread onnxruntime/core/providers/coreml/builders/impl/gather_op_builder.cc Outdated
Comment thread onnxruntime/core/providers/coreml/builders/impl/gather_op_builder.cc Outdated
@borg323
Copy link
Copy Markdown
Contributor Author

borg323 commented Jan 7, 2026

Is this OK now?

@edgchen1
Copy link
Copy Markdown
Contributor

edgchen1 commented Jan 9, 2026

/azp run Linux QNN CI Pipeline,Windows ARM64 QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows GPU Doc Gen CI Pipeline

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

@edgchen1 edgchen1 merged commit 412233f into microsoft:main Jan 12, 2026
122 of 125 checks passed
@edgchen1
Copy link
Copy Markdown
Contributor

thanks for the contribution!

@borg323 borg323 deleted the coreml-gather-fp16 branch January 12, 2026 20:50
alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jan 20, 2026
### Description
<!-- Describe your changes. -->
The coreml gather MLProgram operator supports fp16, but the check was
missing in `GatherOpBuilder::HasSupportedInputsImpl()`


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
We use `Gather` in LeelaChessZero.

---------

Co-authored-by: borg323 <borg323@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:CoreML issues related to CoreML execution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants