Skip to content
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

[BUG] get_workitem_id_y在实际thread num不为32时出错 #10

Open
lifeiabc opened this issue Sep 20, 2023 · 0 comments
Open

[BUG] get_workitem_id_y在实际thread num不为32时出错 #10

lifeiabc opened this issue Sep 20, 2023 · 0 comments

Comments

@lifeiabc
Copy link
Collaborator

复现方法:cts basic中work_item_functions用例。
由于spike里的init mask跟据pocl传入的numt设置的,所以warp启动时所有的thread全部工作。当实际thream不足一个warp里thread数量时,在get_workitem_id_y会向同一个内存地址写入相同的数据,这样只有最后一个写入的值生效,如下:
core 0: 3 0x80000160 (0x0000e07b) c8_vstart 0x00000000 e32 m1 l32 mem 0x90000014 0x00000000 mem 0x90000014 0x00000001 mem 0x90000014 0x00000002 mem 0x90000014 0x00000003 mem 0x9000001
4 0x00000004 mem 0x90000014 0x00000005 mem 0x90000014 0x00000006 mem 0x90000014 0x00000007 mem 0x90000014 0x00000008 mem 0x90000014 0x00000009 mem 0x90000014 0x0000000a mem 0x90000014 0
x0000000b mem 0x90000014 0x0000000c mem 0x90000014 0x0000000d mem 0x90000014 0x0000000e mem 0x90000014 0x0000000f mem 0x90000014 0x00000010 mem 0x90000014 0x00000011 mem 0x90000014 0x00
000012 mem 0x90000014 0x00000013 mem 0x90000014 0x00000014 mem 0x90000014 0x00000015 mem 0x90000014 0x00000016 mem 0x90000014 0x00000017 mem 0x90000014 0x00000018 mem 0x90000014 0x00000
019 mem 0x90000014 0x0000001a mem 0x90000014 0x0000001b mem 0x90000014 0x0000001c mem 0x90000014 0x0000001d mem 0x90000014 0x0000001e mem 0x90000014 0x0000001f

临时解决方法:根据local_size_x、local_size_y、local_size_z限制返回的local_id_x、local_id_y、local_id_z大小,但实际还是warp启时init mask问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant