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

Add querying OpenCL device infomation #1324

Closed
wants to merge 2 commits into from

Conversation

marty1885
Copy link

Hi, this pull request allows TVM to have the correct warp size and thread count when using OpenCL.
This PR is not compatible with some parts of #1290. But I believe this is a better approach that it provides accurate information about the device on all devices.

@marty1885 marty1885 changed the title Querying OpenCL device infomation instead of guessing Add querying OpenCL device infomation Jun 23, 2018
@tqchen
Copy link
Member

tqchen commented Jun 24, 2018

thanks for proposing this. The warp information was only used to perform warp level optimization(in opencl's term subgroup memory). So far it is only enabled for intel graphics device, where we know the necessary multiple. A better way to get this value, than querying by dummy kernel, might be check if the subgroup extension is available and query subgroup size.

On the other hand, we cannot directly do runtime query during of target creation. This is mainly because that the compiler may exist in places other than the target device(e.g. compile on your laptop, runs on your phone), and the on the fly query can be inaccurate.

@tqchen
Copy link
Member

tqchen commented Jun 24, 2018

So to summarize, we might need to keep the old conservative way of warp size assignment in target creation, but maybe could enhance opencl runtime a bit to also query return a correct warp size(using subgroup info query API).

@tqchen tqchen added status: review in progress status: need update need update based on feedbacks labels Jun 24, 2018
@tqchen
Copy link
Member

tqchen commented Jul 3, 2018

@marty1885 can you update the PR according to the feedbacks?

@tqchen
Copy link
Member

tqchen commented Jul 16, 2018

close for now due to inactive status, let us open another PR based on the discussion

@tqchen tqchen closed this Jul 16, 2018
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.

2 participants