Feature/add mul python api#548
Merged
PanZezhong1725 merged 1 commit intoNov 12, 2025
Merged
Conversation
Closed
| import numpy as np | ||
|
|
||
|
|
||
| def _scalar_to_tensor(scalar_value, reference_tensor): |
Collaborator
There was a problem hiding this comment.
Collaborator
Author
There was a problem hiding this comment.
先去掉了这部分的支持,re-force push了
PanZezhong1725
requested changes
Nov 5, 2025
| """Convert a scalar value to a tensor with the same shape and dtype as reference_tensor""" | ||
| # Use torch to create the tensor first (handles dtype conversion correctly), | ||
| # then convert to infinicore tensor via from_blob | ||
| import torch |
Collaborator
Author
There was a problem hiding this comment.
是的,我先去掉这部分scalar的支持
222b774 to
5c89a40
Compare
5c89a40 to
a565b36
Compare
PanZezhong1725
approved these changes
Nov 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
测试框架更新后重新修改,测试通过: