Skip to main content

A Simple Pytorch version for CFU

Project description

pytorch_open_registration_example

Example of using pytorch's open device registration API. It covers:

(1) Writing custom kernels in C++, and registering them to the PyTorch dispatcher

(2) Providing a user API for your custom device, so users can invoke the custom code using torch.foo(..., device="custom_device")

(3) Registering a custom memory allocator

(4) Registering a custom device guard

This repo should be run using the latest pytorch nightly. If it fails on the latest nightly, please post an issue and I'll take a look!

python setup.py sdist bdist_wheel
twine upload dist/*

Project details


Download files

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

Source Distribution

torch_cfu-0.0.2.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file torch_cfu-0.0.2.tar.gz.

File metadata

  • Download URL: torch_cfu-0.0.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/65.3.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for torch_cfu-0.0.2.tar.gz
Algorithm Hash digest
SHA256 584816c71c4450adef2faab7a3a7a91b5bf0c35cf5235b1dd69f2ec876ea5e98
MD5 c1fe3ac330bcab5778eb6d09d83aca83
BLAKE2b-256 337a90ce9dbbfc03f5709adc0cd1709659427ef2897856a1531211e6a5f0bfff

See more details on using hashes here.

Supported by

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