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
[TARGET] add amd_gpu target #5645
Conversation
Thanks @mei-ye . My understanding is that this is for AMD integrated cards. Given that the programming model is still vulkan, we might want to discuss how to distinguish it from the rocm part. Perhaps an alternative way is to directly use See example in https://github.com/apache/incubator-tvm/blob/master/python/tvm/target/target.py#L155 |
@@ -194,6 +194,10 @@ def webgpu(self, dev_id=0): | |||
"""Construct WebGPU device.""" | |||
return self.context(15, dev_id) | |||
|
|||
def amd_gpu(self, dev_id=0): |
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.
we can directly use vulkan so it is not necessary
Tianqi and Thierry, Thanks for our advise. I can see your points, especially the benefit of supporting both vulkan and opencl. But I also have some concerns:
|
Also, without a new target, we will need to merge logs for all APU models into opencl_v0.xx.log |
We don't need a new target key for autotvm and logs, see the case for mali https://github.com/uwsampl/tophub/blob/master/tophub/mali_v0.04.log The device is preserved throughout the tvm In terms of the future runtime data sharing between cpu and GPU. I think that it can be solved directly by extending the opencl or vulkan runtime to support the shared memory, likely the memory will become vulkan_shared, like the cpu_pinned memory in the CUDA. |
yes, we don't need a new target key for autotvm log, but we will need opencl_vxx.log to combine logs for different devices, right? |
See the example case above(the link to mali log) which uses the opencl, but have a separate log by itself |
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.
This target uses vulkan runtime. Once this change is pushed into upstream, a log will be added to tophub. This change contains minimum target-specific codes.