본문 바로가기

AI Compiler framework

lower / optimize_plan 제거 파이프 라인

기존 구조가 emit - lower - plan - runtime 이었음

lower 가 사실상 이미 정해진 정보를 옮겨 적는 단계가  되면서 불필요해짐

emitter 가 backend-ready 정보를 미리 채우고, compile 은 alias 정책 결정만 수행하는 방식

 

1) 생성되는 데이터 구조들

1.1 Value ( Builder.values[] )

Builder 내부에서 텐서 단위를 vid 로 관리한다.

  • Value.vid
  • Value.spec
  • Value.role : input | param | state | tmp | output
  • Value.producer_op, Value.users 

 

1.2 Op ( Builder.ops[] )

Layer / Emitter 가 연산을 추가하면 Op 가 쌓인다.

기존에는 Op 에 kind / attrs 만 존재,

compile 중간에서 registry.lookup / pack_attrs 로 backend 정보르 붙였음

지금은 emitter-first 라 Op 자체가 이미 backend-ready 캐시를 갖는다.

 

1.3 ExecPlan

  • ops : List[Op]
  • alias : Dict[out_vid, in_vid]

lowered ops 리스트가 사라짐, runtime 이 b.ops 그대로 순회해 op_call 을 수행해도 된다.