Lightning-AI/lightning-thunder

Handle returning NamedTuples from the JIT

開放

#147 建立於 2024年4月9日

 (0 則留言) (0 個反應) (0 位負責人)Python (114 個分叉)github user discovery
enhancementhelp wantedjit

倉庫指標

星標
 (1,460 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

NamedTuples have (some) support in the interpreter, but to return them from the JIT, we would need some more things:

  • ensure value tracking covers creation (populating the attribute_wrappers) - this is in interpreter,
  • when seeing NamedTuples being returned, add epilogue code to create the NamedTuple from its contents (which are available),

This is nontrivial as it requires return values to be routed through the epilogue, but I don't think that is grave.

This is probably an intermediate to advanced issue for people fond of the JIT / frontend bits.

貢獻者指南