Skip to content

[ET-VK][mac] Allow vulkan binaries to work with Vulkan SDK + fixes to enable debugPrintf extension #7957

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

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Jan 24, 2025

Stack from ghstack (oldest at bottom):

Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

  • On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. source
  • VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: D68650936

cc @manuelcandales

… enable debugPrintf extension

## Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

* On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. [source](https://stackoverflow.com/questions/58732459/vk-error-incompatible-driver-with-mac-os-and-vulkan-moltenvk)
* VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: [D68650936](https://our.internmc.facebook.com/intern/diff/D68650936/)

[ghstack-poisoned]
@pytorch-bot pytorch-bot bot added the module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/ label Jan 24, 2025
Copy link

pytorch-bot bot commented Jan 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7957

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 97bc865 with merge base 1f1a96f (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 24, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68650936

SS-JIA added a commit that referenced this pull request Jan 24, 2025
… enable debugPrintf extension

## Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

* On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. [source](https://stackoverflow.com/questions/58732459/vk-error-incompatible-driver-with-mac-os-and-vulkan-moltenvk)
* VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: [D68650936](https://our.internmc.facebook.com/intern/diff/D68650936/)

ghstack-source-id: 263006772
Pull Request resolved: #7957
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@facebook-github-bot facebook-github-bot merged commit e6db67c into gh/SS-JIA/173/base Jan 27, 2025
45 of 48 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/173/head branch January 27, 2025 21:26
kirklandsign pushed a commit that referenced this pull request Jan 27, 2025
… enable debugPrintf extension

## Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

* On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. [source](https://stackoverflow.com/questions/58732459/vk-error-incompatible-driver-with-mac-os-and-vulkan-moltenvk)
* VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: [D68650936](https://our.internmc.facebook.com/intern/diff/D68650936/)

ghstack-source-id: 263006772
Pull Request resolved: #7957

Co-authored-by: Stephen Jia <[email protected]>
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
… enable debugPrintf extension

## Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

* On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. [source](https://stackoverflow.com/questions/58732459/vk-error-incompatible-driver-with-mac-os-and-vulkan-moltenvk)
* VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: [D68650936](https://our.internmc.facebook.com/intern/diff/D68650936/)

ghstack-source-id: 263006772
Pull Request resolved: #7957

Co-authored-by: Stephen Jia <[email protected]>
zonglinpeng pushed a commit to zonglinpeng/executorch that referenced this pull request Jan 30, 2025
… enable debugPrintf extension

## Context

Add a buck config option to prevent linking against MoltenVK when building for MacOS, instead opting to use volk. This is useful for seeing debug print statments from GLSL code.

Also implement some fixes to make things work when using system-installed Vulkan SDK, and some fixes to enable using debug Printf extension on Mac.

Specifically, the fixes are as follows:

* On newer versions of the Vulkan SDK, a portability instance extension needs to be explicitly enabled, otherwise creating the Vulkan instance will complain about the driver being incompatible. [source](https://stackoverflow.com/questions/58732459/vk-error-incompatible-driver-with-mac-os-and-vulkan-moltenvk)
* VkConfig on Mac doesn't show options to enable debugprintf, therefore it has to be enabled programmatically.

Differential Revision: [D68650936](https://our.internmc.facebook.com/intern/diff/D68650936/)

ghstack-source-id: 263006772
Pull Request resolved: pytorch#7957

Co-authored-by: Stephen Jia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported module: vulkan Issues related to the Vulkan delegate and code under backends/vulkan/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants