r/ProgrammerHumor • • Oct 02 '26

Meme cloudOverkill

Post image
11k Upvotes

267 comments sorted by

View all comments

Show parent comment

46

u/MitchIsMyRA Oct 02 '26

Have you ever tried this?

https://docs.pytorch.org/cppdocs/

39

u/Kinexity Oct 02 '26

I know it exists. My problem is that I am finishing my thesis and I cannot switch between languages now. Once I finish it though I will probably learn Pytorch in C++.

15

u/MitchIsMyRA Oct 02 '26

Ah well there ya go. Are you allowed to create your own python bindings for C++ code? uv makes this quite easy

https://docs.astral.sh/uv/concepts/projects/init/#projects-with-extension-modules

And if you haven’t heard of uv, now you have. Amazing python virtual environment/project manager

3

u/abd53 Oct 03 '26

Is it just an API to python's engine or is the engine in C or C++?

6

u/UdPropheticCatgirl Oct 03 '26

pytorch has always been written primarily in C++, it just exposes API to python through bindings.