issue/584 - 添加python的rope的测试, embeddding的实现和测试#585
Merged
PanZezhong1725 merged 1 commit intoInfiniTensor:mainfrom Nov 17, 2025
Merged
issue/584 - 添加python的rope的测试, embeddding的实现和测试#585PanZezhong1725 merged 1 commit intoInfiniTensor:mainfrom
PanZezhong1725 merged 1 commit intoInfiniTensor:mainfrom
Conversation
0fe3166 to
36b7c7f
Compare
36b7c7f to
facc6c8
Compare
facc6c8 to
f3ec25f
Compare
pengcheng888
commented
Nov 17, 2025
pengcheng888
commented
Nov 17, 2025
| return inputs_embeds; | ||
| } | ||
|
|
||
| void embedding_(Tensor out, Tensor input, Tensor weight) { |
Collaborator
Author
There was a problem hiding this comment.
python的接口中,input只能是cpu类型。 在之前测试中,如果input是gpu,在c++中to到gpu上的话,会报pin_memory相关的警告,然后程序就段错误了。
Ceng23333
reviewed
Nov 17, 2025
| # Test Case 1: Out-of-place (return value) | ||
| test_cases.append( | ||
| TestCase( | ||
| inputs=[x_spec, sin_table_spec, cos_table_spec], |
Collaborator
Author
There was a problem hiding this comment.
是的,用随机值测试的。当时相了一下,发现现在测试脚本,好像不太容易指定变量,就用随机数值了
f3ec25f to
5c4747c
Compare
PanZezhong1725
approved these changes
Nov 17, 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.
目标版本
main
功能描述
(1)添加python的rope的测试
(2)添加python的embeddding的实现和测试
测试结果
embedding_cpu
embedding_nvidia

rope_nvidia

rope_cpu
