-
Notifications
You must be signed in to change notification settings - Fork 61
issue/584 - 添加python的rope的测试, embeddding的实现和测试 #585
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
Conversation
0fe3166 to
36b7c7f
Compare
36b7c7f to
facc6c8
Compare
facc6c8 to
f3ec25f
Compare
| return inputs_embeds; | ||
| } | ||
|
|
||
| void embedding_(Tensor out, Tensor input, Tensor weight) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python的接口中,input只能是cpu类型。 在之前测试中,如果input是gpu,在c++中to到gpu上的话,会报pin_memory相关的警告,然后程序就段错误了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件名应该时rope吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
| # Test Case 1: Out-of-place (return value) | ||
| test_cases.append( | ||
| TestCase( | ||
| inputs=[x_spec, sin_table_spec, cos_table_spec], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测例里sin和cos都是随机值吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,用随机值测试的。当时相了一下,发现现在测试脚本,好像不太容易指定变量,就用随机数值了
f3ec25f to
5c4747c
Compare
目标版本
main
功能描述
(1)添加python的rope的测试
(2)添加python的embeddding的实现和测试
测试结果
embedding_cpu
embedding_nvidia

rope_nvidia

rope_cpu
