资源算法extension-cpp

extension-cpp

2019-10-09 | |  160 |   0 |   0

C++/CUDA Extensions in PyTorch

An example of writing a C++ extension for PyTorch. See here for the accompanying tutorial.

There are a few "sights" you can metaphorically visit in this repository:

  • Inspect the C++ and CUDA extensions in the cpp/ and cuda/ folders,

  • Build C++ and/or CUDA extensions by going into the cpp/ or cuda/ folder and executing python setup.py install,

  • JIT-compile C++ and/or CUDA extensions by going into the cpp/ or cuda/ folder and calling python jit.py, which will JIT-compile the extension and load it,

  • Benchmark Python vs. C++ vs. CUDA by running python benchmark.py {py, cpp, cuda} [--cuda],

  • Run gradient checks on the code by running python grad_check.py {py, cpp, cuda} [--cuda].

  • Run output checks on the code by running python check.py {forward, backward} [--cuda].

Authors

Peter Goldsborough

上一篇:caffemodel2pytorch

下一篇:poutyne

用户评价
全部评价

热门资源

  • allennlp-server

    allennlp-server Serve allennlp services as sep...

  • ubuntu-allennlp

    ubuntu-allennlp AllenAI AllenNLP image based o...

  • allennlp_extras

    allennlp_extras Some utilities build on top of...

  • allennlp-dureader

    An Apache 2.0 NLP research library, built on Py...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...