Skip to content

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Sep 3, 2025

增加单测 test_draft_model_preprocess

Copy link

paddle-bot bot commented Sep 3, 2025

Thanks for your contribution!

np.testing.assert_allclose(
results["seq_lens_this_time"], np.array([40, 62, 31, 66, 90, 1, 5, 24, 40, 69], dtype="int32")
)
np.testing.assert_allclose(results["accept_tokens"][0][0:4], np.array([12, 16, 12, 22]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里变量都用 rand + 固定 seed 的方式产出,最后根据 random 的值校对结果,逻辑有点怪;
期望两种方式:
1.[Best] 使用 python 组网复现 GPU Kernel 逻辑,校对两者结果
2.手动设置部分有意义的值,并手动推算出正确结果,作为单测

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@freeliuzc 已修改CI已完成

@freeliuzc
Copy link
Collaborator

Great Work!

@freeliuzc freeliuzc merged commit 976aa88 into PaddlePaddle:develop Sep 8, 2025
15 of 17 checks passed
@co63oc co63oc deleted the fix27 branch September 9, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants