Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shoyamanishi/metalcomputeattributechecker
Shows "Kernel Function Input Attributes" of "Metal Compute" kernel in a kernel for Macos and iOS.
https://github.com/shoyamanishi/metalcomputeattributechecker
apple gpgpu metal
Last synced: about 4 hours ago
JSON representation
Shows "Kernel Function Input Attributes" of "Metal Compute" kernel in a kernel for Macos and iOS.
- Host: GitHub
- URL: https://github.com/shoyamanishi/metalcomputeattributechecker
- Owner: ShoYamanishi
- License: mit
- Created: 2021-07-18T20:25:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-18T21:28:43.000Z (over 3 years ago)
- Last Synced: 2023-08-12T07:02:34.339Z (over 1 year ago)
- Topics: apple, gpgpu, metal
- Language: Swift
- Homepage:
- Size: 447 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MetalComputeAttributeChecker
## What it does?
It shows the values of **Kernel Function Input Attributes** as the input parameters to the Metal Compute kernel.
The values are taken in the kernel at the specified thread in the specified configuration.
The thread is specified by the `thread_position_in_grid` attribute.
The configuration is specified by `groups_per_grid` and `threads_per_threadgroup` to
`dispatchThreadgroups()` of `MTLComputeCommandEncoder`.It supports both Macos as a command-line tool, and iOS as a UI App.
See https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf for details.
## How it is useful?
Those attributes of METAL are not so well documented as CUDA counterparts, and I think the best way to learn is to run it on actual devices and see the bevavior.## Install
### Macos
Open a terminal, go to `MetalComputeAttributeChecker/MetalComputeAttribs/` and `make all`.
The code is written in C++/Obj-C.### iOS
Open `MetalComputeAttributeChecker/MetalComputeAttribs.xcodeproj` in Xcode.
The code is writtin in SwiftUI.