Skip to content

Conversation

@ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Aug 23, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

Add index check for index_sample gpu kernel

  1. 0-size-cpu(numpy error,生不成 index 值)
图片 图片 2. 0-size-gpu(numpy error,生不成 index 值) 图片 3. pr 修改 GPU 和 CPU 一样检查越界,避免出现未知的 codedump

@paddle-bot
Copy link

paddle-bot bot commented Aug 23, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Aug 23, 2025
@ooooo-create ooooo-create force-pushed the check_index_for_index_sample_gpu branch 2 times, most recently from bd5d73a to 1847aef Compare August 24, 2025 04:10
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@DanielSun11
Copy link
Contributor

image

请补充下paddleapitest回测的结果。

#72637
paddleapitest地址 https://github.com/PFCCLab/PaddleAPITest
出错配置存放的位置:

@ooooo-create
Copy link
Contributor Author

请补充下paddleapitest回测的结果。

done

Comment on lines 51 to 56
PADDLE_ENFORCE(sample_idx >= 0 && sample_idx < input_length,
"Variable value (index) of OP(index_sample) "
"expected >= 0 and < %ld, but got %ld. Please check input "
"value.",
input_length,
sample_idx);
Copy link
Contributor

Choose a reason for hiding this comment

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

在cuda kernel中添加这些检查是十分不合理的,会影响cuda warp的执行效率,报错时也会产生特别多的重复日志。这部分检查需要想办法转化为在launch cuda kernel之前在CPU侧完成

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, 改成 copy 到 cpu 上进行检查了

@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@luotao1
Copy link
Contributor

luotao1 commented Sep 2, 2025

close due to the following PR is merged:

@luotao1 luotao1 closed this Sep 2, 2025
@ooooo-create ooooo-create deleted the check_index_for_index_sample_gpu branch September 29, 2025 09:44
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