+ All Categories
Home > Documents > Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational...

Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational...

Date post: 05-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
12
Yuan Lin and Yongfeng Gu TOWARDS AN OPERATIONAL MODEL OF SCHEDULES IN TENSOR EXPRESSION 2019-12-05
Transcript
Page 1: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Yuan Lin and Yongfeng Gu

TOWARDS AN OPERATIONAL MODEL OF SCHEDULES IN TENSOR EXPRESSION

2019-12-05

Page 2: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

QQuestion: is this a legal schedule?

Page 3: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

QIllegal, but why?

TVMError: Check failed: found_attach || stage_attach.size() == 0: Invalid Schedule, cannot find the producer compute(B, 0x2851e60) along the loop nest specified by compute_at of consumer compute(B.local, 0x2b83b00)

Page 4: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Show the Schedule Tree

Page 5: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

LCA(B, C)

LCA(BL, C)

Illegal

Violation of Legality

Page 6: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

LCA(B, C)

LCA(BL, C)

Legal

A Possible Fix

Page 7: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Background

• Describe schedule primitives and transformations in a more elaborate way

• Provide guidance to new TE users

• Help debugging tricky TE programs

• Provide a framework to discuss bugs (is this a bug or feature?)

• Ensure conherent development of new features

Motivations

Page 8: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Dataflow Graph

The Operational Model

IterVar-relation DAG

Tensor Expression

Schedule Tree

Page 9: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

The Document

Page 10: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Example pages

Page 11: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

• We would like to contribute the document to the TVM community.• We are also working on a visualization tool, Tensor Expression Debug Display (TEDD).

• Questions/Survey:• Is this model helpful?

• Is this or similar model well understood?

• Will you use it for future discussion?

• Let's work together to• improve the model

• complete the document

Help Needed!

Page 12: Towards Tensor Expression Schedule operational · Schedule Tree IterVar-reIation DAG Operational Semantics split fuse (loop collapse) reorder tile compute at cache read An operational

Thank you


Recommended