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

update torchsharp to 0.105.0 #7416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LittleLittleCloud
Copy link
Contributor

We are excited to review your PR.

So we can do the best job, please check:

  • There's a descriptive title that will make sense to other developers some time from now.
  • There's associated issues. All PR's should have issue(s) associated - unless a trivial self-evident change such as fixing a typo. You can use the format Fixes #nnnn in your description to cause GitHub to automatically close the issue(s) when your PR is merged.
  • Your change description explains what the change does, why you chose your approach, and anything else that reviewers should know.
  • You have included any necessary tests in the same PR.

@Copilot Copilot bot review requested due to automatic review settings March 12, 2025 00:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the TorchSharp integration to version 0.105.0 by refining API calls and enforcing non-null assertions on buffers. Key changes include:

  • Adding null-forgiving operators ("!") to get_buffer calls in both RotaryEmbedding.cs and QuantizedLinear.cs.
  • Updating named parameter "kernelSize" to "kernel_size" in ConvModule.cs to align with TorchSharp’s API.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Microsoft.ML.GenAI.Core/Module/RotaryEmbedding.cs Added null-forgiving operator on get_buffer usage.
src/Microsoft.ML.GenAI.Core/Module/QuantizedLinear.cs Added null-forgiving operator on multiple get_buffer calls and adjusted arithmetic operations.
src/Microsoft.ML.TorchSharp/AutoFormerV2/ConvModule.cs Renamed named parameter for consistency with TorchSharp.

@ericstj
Copy link
Member

ericstj commented Mar 12, 2025

Which feed are these new versions published to? If only nuget.org, should they be mirrored?

@michaelgsharp
Copy link
Member

Yes it needs mirroring. Being done here, https://dev.azure.com/dnceng/internal/_build/results?buildId=2676108&view=results.

@michaelgsharp
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@michaelgsharp
Copy link
Member

Ah, I think I remember now. The reason we had stayed on the old version was that these newer versions don't support OSX-x64. So its gonna require a bit more work to swap versions @LittleLittleCloud. Going to have to stop torch sharp from building on osx x64 and skip those tests there as well. We've dont something similar in ML.NET for x86, but now it will need to be expanded to this as well.

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.

3 participants