跳到主要內容
AI News HubLIVE
更多
來源內容 · 翻譯待補全1 分鐘閱讀

待翻譯:Everything is a UOp – reading the deep learning stack behind comma[dot]AI

文章摘要

AI 服務暫時不可用,以下為來源摘要,待恢復後補全翻譯:i’ve used PyTorch for years. a @ b, .backward(), .cuda(). works every time. i never thought about what’s underneath. then i came across tinygrad. it’s the deep learning stack behind comma.ai’s op…

來源Hacker News AI作者: nathaah3
待翻譯:Everything is a UOp – reading the deep learning stack behind comma[dot]AI
回報錯誤

更正管道尚未開通,可先複製下方文章資訊留存。

查看更正說明
直接讀正文

AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。

i’ve used PyTorch for years. a @ b, .backward(), .cuda(). works every time. i never thought about what’s underneath. then i came across tinygrad. it’s the deep learning stack behind comma.ai’s openpilot, the open-source self-driving system. 17K lines of Python. PyTorch is 3 million lines of C++. this thing fits the whole pipeline, including the compiler, in less code than some test suites. i figured i’d spend an afternoon reading it. to give an outline of how tinygrad works, we would explore these 4 stages: the first thing i noticed to start with, we need to know how a tensor operation works. the fundamental tensor operation used in DL libraries is matrix multiplication. so, i opened a terminal and typed this out. from tinygrad import Tensor a = Tensor.rand(4, 4) b = Tensor.rand(4, 4) c = a.matmul(b) print(c.shape) # (4, 4)

展開要點與分析

文章情報

工程師進階

要點

  • AI 服務暫時不可用,系統已先保留來源內容與降級後設資料。
  • i’ve used PyTorch for years. a @ b, .backward(), .cuda(). works every time. i never thought about what’s underneath. then i came across tinygrad. it’s the deep l…

要點與分析由自動化流程生成,可能有誤,請結合原始來源核實。