Giter VIP home page Giter VIP logo

Comments (6)

billhollings avatar billhollings commented on August 23, 2024

@oscarbg

Halfs should work on both macOS and iOS.

Can you clarify what the error is, please?

You seem to indicate a validation error of some sort:

Debug Report: SC: SPIR-V module not valid: Using a 16-bit floating point type requires the Float16 or Float16Buffer capability, or an extension that explicitly enables 16-bit floating point.

That does not originate in MoltenVK or Metal.

When is that error occurring? Does it happen during the creation of your SPIR-V? Or is it coming from a Vulkan SDK validation layer that you have enabled at runtime?

And is that validation the main issue? Or is something else going wrong somewhere?

from moltenvk.

karl-lunarg avatar karl-lunarg commented on August 23, 2024

for whatever reason need to use

VK_LAYER_PATH=/etc/vulkan/explicit_layers.d ./vulkan_minimal_compute

to find the layers..

This was a typo-level bug in the SDK and the SDK documentation. The correct name for the directory is:

/etc/vulkan/explicit_layer.d

(No 's' in layers)

It looks like you copied this explicit_layers.d directory from the SDK into /etc/vulkan.
All you have to do is rename /etc/vulkan/explicit_layers.d to /etc/vulkan/explicit_layer.d and the Vulkan loader should find the layers without the need to specify VK_LAYER_PATH.
(The loader is behaving correctly. But the directory in the SDK and the SDK docs used the wrong name.)

This has already been corrected for the next SDK release.


The Debug Report message is coming from the Shader Checker portion of the Vulkan validation layers.

from moltenvk.

billhollings avatar billhollings commented on August 23, 2024

@oscarbg

Should this issue still be open?

If so...can you answer the questions in my earlier response, please?

from moltenvk.

oscarbg avatar oscarbg commented on August 23, 2024

@billhollings
allow me till end of week to retest and share what I find..

from moltenvk.

oscarbg avatar oscarbg commented on August 23, 2024

OK installed latest Vulkan 1.1.77 MacOS SDK and half seems working OK (generated image is OK)..
I'm closing issue..
@karl-lunarg yes I copied to /etc and renaming to explicit_layer.d does the trick! thanks..
@billhollings are you aware if half precision in desktop is ignored and run in fp32.. I say that because I'm running on Vega GPU that has FP16 HW but other Metal GPUs like NV Kepler GPUs don't have FP16 HW..
i.e. will this program "doing fp16 math" run incorrectly on NV Kepler GPUs for example?

as you see debug layers still show issue:
Debug Report: Validation: Object: VK_NULL_HANDLE (Type = 0) | SPIR-V module not valid: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension)
but any way is only validation error not MoltenVK related..

full output:
./vulkan_minimal_compute
[mvk-info] MoltenVK version 1.0.12. Vulkan version 1.0.77.
[mvk-info] GPU device:
model: AMD Radeon RX Vega 56
type: Discrete
vendorID: 0x10de
deviceID: 0x13c2
pipelineCacheUUID: 00000000-0000-0000-0000-27130000271C
supports the following Metal Feature Sets:
macOS GPU Family 1 v3
macOS GPU Family 1 v2
macOS GPU Family 1 v1
[mvk-info] Created VkDevice to run on GPU AMD Radeon RX Vega 56
Debug Report: Validation: Object: VK_NULL_HANDLE (Type = 0) | SPIR-V module not valid: Capability Float16 is not allowed by Vulkan 1.0 specification (or requires extension)
[mvk-info] Shader library compilation succeeded with warnings (code 4):

Compilation succeeded with:

program_source:6:16: warning: unused variable 'gl_WorkGroupSize'
constant uint3 gl_WorkGroupSize = uint3(32u, 32u, 1u);
^

from moltenvk.

billhollings avatar billhollings commented on August 23, 2024

@oscarbg

Glad its working for you. Thanks for closing.

Regarding your question...I have no knowledge of what the individual GPU's will do internally. Certainly I would expect it would be transparent to any interactions (reads/writes) with buffers and textures.

from moltenvk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.