跳到主要内容
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…

要点与分析由自动化流程生成,可能有误,请结合原始来源核实。