Skip to content

Commit 9bae181

Browse files
committed
add doc for "anchor-block" module equality
1 parent 2f37900 commit 9bae181

File tree

7 files changed

+36
-0
lines changed

7 files changed

+36
-0
lines changed

include/tvm/meta_schedule/database.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ class DatabaseNode : public runtime::Object {
183183
* - "structural": Use StructuralEqual/Hash
184184
* - "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
185185
* equality testing and hashing.
186+
* - "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
187+
* given module. The "ignore-ndarray" varint is used for the extracted blocks
188+
* or in case no anchorblock is found.
189+
* For the definition of the anchor block, see tvm/tir/analysis.h.
186190
*/
187191
explicit DatabaseNode(String mod_eq_name = "structural");
188192

@@ -274,6 +278,10 @@ class PyDatabaseNode : public DatabaseNode {
274278
* - "structural": Use StructuralEqual/Hash
275279
* - "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
276280
* equality testing and hashing.
281+
* - "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
282+
* given module. The "ignore-ndarray" varint is used for the extracted blocks
283+
* or in case no anchorblock is found.
284+
* For the definition of the anchor block, see tvm/tir/analysis.h.
277285
*/
278286
explicit PyDatabaseNode(String mod_eq_name = "structural");
279287

python/tvm/meta_schedule/database/json_database.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class JSONDatabase(Database):
4040
- "structural": Use StructuralEqual/Hash
4141
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
4242
equality testing and hashing.
43+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
44+
given module. The "ignore-ndarray" varint is used for the extracted
45+
blocks or in case no anchorblock is found.
46+
For the definition of the anchor block, see tir/analysis/analysis.py.
4347
"""
4448

4549
path_workload: str

python/tvm/meta_schedule/database/memory_database.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class MemoryDatabase(Database):
3333
- "structural": Use StructuralEqual/Hash
3434
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
3535
equality testing and hashing.
36+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
37+
given module. The "ignore-ndarray" varint is used for the extracted
38+
blocks or in case no anchorblock is found.
39+
For the definition of the anchor block, see tir/analysis/analysis.py.
3640
"""
3741

3842
def __init__(

python/tvm/meta_schedule/database/schedule_fn_database.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class ScheduleFnDatabase(Database):
3939
- "structural": Use StructuralEqual/Hash
4040
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
4141
equality testing and hashing.
42+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
43+
given module. The "ignore-ndarray" varint is used for the extracted
44+
blocks or in case no anchorblock is found.
45+
For the definition of the anchor block, see tir/analysis/analysis.py.
4246
"""
4347

4448
def __init__(

python/tvm/meta_schedule/relay_integration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ def extract_tasks(
143143
- "structural": Use StructuralEqual/Hash
144144
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
145145
equality testing and hashing.
146+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
147+
given module. The "ignore-ndarray" varint is used for the extracted
148+
blocks or in case no anchorblock is found.
149+
For the definition of the anchor block, see tir/analysis/analysis.py.
146150
147151
Returns
148152
-------
@@ -288,6 +292,10 @@ def tune_relay(
288292
- "structural": Use StructuralEqual/Hash
289293
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
290294
equality testing and hashing.
295+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
296+
given module. The "ignore-ndarray" varint is used for the extracted
297+
blocks or in case no anchorblock is found.
298+
For the definition of the anchor block, see tir/analysis/analysis.py.
291299
292300
Returns
293301
-------

python/tvm/meta_schedule/tune.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def tune_tasks(
7676
- "structural": Use StructuralEqual/Hash
7777
- "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
7878
equality testing and hashing.
79+
- "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
80+
given module. The "ignore-ndarray" varint is used for the extracted
81+
blocks or in case no anchorblock is found.
82+
For the definition of the anchor block, see tir/analysis/analysis.py.
7983
8084
Returns
8185
-------

src/meta_schedule/module_equality.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ class ModuleEquality {
4242
* - "structural": Use StructuralEqual/Hash
4343
* - "ignore-ndarray": Same as "structural", but ignore ndarray raw data during
4444
* equality testing and hashing.
45+
* - "anchor-block": Apply equality testing and hashing on the anchor block extracted from a
46+
* given module. The "ignore-ndarray" varint is used for the extracted blocks
47+
* or in case no anchorblock is found.
48+
* For the definition of the anchor block, see tvm/tir/analysis.h.
4549
* \return An owning pointer to the created instance
4650
*/
4751
static std::unique_ptr<ModuleEquality> Create(const std::string& mod_eq_name);

0 commit comments

Comments
 (0)