Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

FYI: This will not work in PyTorch 0.5 #19

Open
ezyang opened this issue Apr 24, 2018 · 3 comments
Open

FYI: This will not work in PyTorch 0.5 #19

ezyang opened this issue Apr 24, 2018 · 3 comments

Comments

@ezyang
Copy link

ezyang commented Apr 24, 2018

We are doing a major refactor of the underlying TH libraries, which means that most of the C API will no longer work. Please see https://github.com/pytorch/extension-cpp for the replacement.

@bwesen
Copy link

bwesen commented Jun 27, 2019

I tried to go the "extension-cpp" route when porting stuff from the old C extension API, but it looks just hideously complicated (at least the examples there).

Are anyone aware of any bare-bones example doing a "hello world" CUDA extension using the new API, kind of like this repository does? Or a migration guide?

@soumith
Copy link
Member

soumith commented Jun 29, 2019

the cuda example looks more complicated? https://github.com/pytorch/extension-cpp/tree/master/cuda

(I am just checking if you are looking at all folders or just the cuda folder, as that's the equivalent of "hello world" CUDA extension)

@bwesen
Copy link

bwesen commented Jun 29, 2019

the cuda example looks more complicated? https://github.com/pytorch/extension-cpp/tree/master/cuda

(I am just checking if you are looking at all folders or just the cuda folder, as that's the equivalent of "hello world" CUDA extension)

Thanks, yes I looked through the cuda example.. After a closer look, I do know I can work through it, I was just kind of surprised that the "most simple" example chosen was a fairly complex piece of machinery with several kernels, forward/backward pass integrations, and an accompanying thousand rows long tutorial :)

What I had expected was an example of how to get a simple CUDA kernel adding two tensors into a third (for example) into pyTorch, with as little code or talk or even flexibility as possible. But don't worry I got it covered for myself, maybe I can write another barebones example and submit later.

Just to be clear, the new tutorial seems to be very well written and immensely usable when writing those full modules but kind of overwhelms you if all you want to do is accelerate a small missing op in CUDA and attach it to pyTorch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants