Skip to main content

run Apple Metal framework

Project description

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

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

runmetal-0.1-py3.7-macosx-10.13-x86_64.egg (10.1 kB view details)

Uploaded Source

runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl (10.0 kB view details)

Uploaded CPython 3.7m macOS 10.13+ x86-64

File details

Details for the file runmetal-0.1-py3.7-macosx-10.13-x86_64.egg.

File metadata

  • Download URL: runmetal-0.1-py3.7-macosx-10.13-x86_64.egg
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for runmetal-0.1-py3.7-macosx-10.13-x86_64.egg
Algorithm Hash digest
SHA256 651348d2e4526a239c4e498300b3d29afff149d70be99cb9904a26e5816c798e
MD5 00550a42a42ba8218ae44cdde0597a90
BLAKE2b-256 24bc9ba10d5568a0f874d6cf77258491e7bf6a251d2bd7fdacb6c90dbf6d8bd9

See more details on using hashes here.

File details

Details for the file runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using 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

File hashes

Hashes for runmetal-0.1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 96cb653a1273c3b6ad086b86ef0c42fd4a56e35e291826ace578b5fa6d31aff6
MD5 6a3207e918ce80f8547460f6d3f6cbd2
BLAKE2b-256 9a9072c5bd29639a79aa9d86375e5ee365e2de3bccdd4acaee60f37054fb7833

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page