Skip to main content

runmetal: call Apple Metal Framework from Python (or YAML-recipe)

  • numpy array -> GPU buffer -> compute -> copy result into numpy array

requirements

  • macOS
  • Xcode (or CommandLineTools)
    • Metal Framework
  • Python 3.x

install

(python)

  • brew install pyenv
  • pyenv install 3.7.1

(venv)

  • python -m venv .
  • ./bin/pip install -r requirements.txt
  • ./bin/python setup.py install
  • ./bin/runmetal run example/xxx.yaml

examples(YAML)

  • pi
    • calculate π by monte carlo
      • numpy.random.random()
      • -> copy numpy to GPU buffer
      • -> compute sqrt(xx+yy) < 1.0
      • -> copy GPU buffer to numpy bool8 array
      • numpy.sum(result == True)/len(result)*4
    • runmetal run example/pi.yaml
  • rand
    • random number generator (LCG)

examples(python)

TBD

Metadata

Release files for runmetal 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for runmetal 0.1
File Interpreter ABI Platform Actions
runmetal-0.1-py3.7-macosx-10.13-x86_64.egg Legacy Egg format - - Details for runmetal-0.1-py3.7-macosx-10.13-x86_64.egg
runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64 Details for runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl

Total release size: 20.1 kB

Release files / runmetal-0.1-py3.7-macosx-10.13-x86_64.egg

Download URL runmetal-0.1-py3.7-macosx-10.13-x86_64.egg
Size 10.1 kB
Tags Egg
SHA-256 checksum
How to use checksums
651348d2e4526a239c4e498300b3d29afff149d70be99cb9904a26e5816c798e
BLAKE2b-256 checksum
How to use checksums
24bc9ba10d5568a0f874d6cf77258491e7bf6a251d2bd7fdacb6c90dbf6d8bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Release files / runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl

Download URL runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl
Size 10.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
96cb653a1273c3b6ad086b86ef0c42fd4a56e35e291826ace578b5fa6d31aff6
BLAKE2b-256 checksum
How to use checksums
9a9072c5bd29639a79aa9d86375e5ee365e2de3bccdd4acaee60f37054fb7833
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Security for runmetal 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page