Building a mini PyTorch in C++ from scratch as a high school student...
dev.to·21h·
Discuss: DEV
🔬Nanopasses
Preview
Report Post

INTRODUCTION

My background? I’ve spent the past 5 years doing game dev in C#. Last year I tried peeking under the Game Engines and that was when my obsession with low level systems began.

I was craving for a challenge, a heavy learning experience, so I decided to make a minimal ML runtime in C++.

I knew it was going to be hard, but I did not expect it to be this hard...

Today was the first day of this project, I tried implementing Tensors and the two most basic tensor operations, add & matmul.

INITIAL STRUGGLES

What confused me the most was how the interpretation of a tensor in ML runtimes differs from how someone who knows the mathematical definition would think.

Mathematically, tensors are just generalized higher dimensional matrices, so it was natural for me to…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help