Skip to content

Conversation

@srkreddy1238
Copy link
Contributor

This PR enabled Vulkan backend for Adreno GPU along side with OpenCL. With this Adreno GPU can be used with Vulkan backend resulting similar performance line OpenCL.

This is foundation to add Vulkan specific extensions of Adreno GPU in near future like co-op matmul ...etc.
Common Relax and TIR pipe line is used for both backends with codegen and runtime being different.

Additionally, this PR defined Vulkan device timer instead of chronos for accurate profiling information.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @srkreddy1238, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands TVM's capabilities by integrating a Vulkan backend for Adreno GPUs, aiming to match OpenCL's performance. It introduces a more robust and flexible memory management system that differentiates between buffer and image resources, and refines data transfer operations. The changes also include a new Vulkan-native timer for precise performance measurement and a unified approach to handling OpenCL and Vulkan within the build system and testing framework.

Highlights

  • Vulkan Backend for Adreno GPU: Enabled Vulkan backend support for Adreno GPUs, allowing them to be used with Vulkan for performance comparable to OpenCL. This lays the groundwork for future Vulkan-specific extensions like co-op matmul.
  • Unified Pipeline and GTest Configuration: The Relax and TIR pipelines now use a common approach for both OpenCL and Vulkan backends. GTest configuration has been centralized and refactored to support both OpenCL and Vulkan tests more efficiently.
  • Enhanced Vulkan Memory Management: Introduced new abstractions for Vulkan resources (buffers and images) and memory management, including support for different memory scopes (e.g., textures) and improved data transfer mechanisms between CPU and GPU, and between different Vulkan resource types.
  • Vulkan Device Timer for Profiling: Implemented a Vulkan-native device timer, replacing the previous chronos-based approach, to provide more accurate profiling information for GPU operations.
  • SPIR-V Code Generation for Images: Updated the SPIR-V code generator to support image arguments and operations (texture2d_store, texture2d_load), enabling the use of image textures in Vulkan kernels.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR is a significant step towards enabling Vulkan support for Adreno GPUs, aligning it with the existing OpenCL backend. The changes are extensive, touching CMake build configurations, the C++ runtime, and Python tests.
Key changes include:

  • Centralizing gtest configuration in CMake.
  • Major refactoring of the Vulkan runtime to support textures as first-class resources alongside buffers. This introduces VulkanResource, VulkanImage, and VulkanMemory classes for better memory management and abstraction.
  • Overhauling CopyDataFromTo to handle various resource types (buffer-to-image, etc.).
  • Adding a Vulkan device timer for accurate profiling.
  • Extending Python tests to run on the Vulkan backend for Adreno.

The overall direction is excellent, introducing better structure and abstractions in the Vulkan runtime. The changes are well-thought-out. I have a few minor suggestions for improvement.

…port

This PR enabled Vulkan backend for Adreno GPU along side with OpenCL.
With this Adreno GPU can be used with Vulkan backend resulting similar performance line OpenCL.

This is foundation to add Vulkan specific extensions in near future like co-op matmul ...etc.
Common Relax and TIR pipe line is used here with codegen and runtime being different.
@srkreddy1238 srkreddy1238 force-pushed the vulkan_texture branch 2 times, most recently from 9ee8886 to 1ff94e5 Compare January 20, 2026 04:24
@srkreddy1238
Copy link
Contributor Author

Also, addressed the codegen issue due to recent change in ForNode handler.

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

Successfully merging this pull request may close these issues.

1 participant