Skip to content

Commit b78f01a

Browse files
authored
More on source reference (apache#466)
1 parent 396c161 commit b78f01a

File tree

7 files changed

+10
-5
lines changed

7 files changed

+10
-5
lines changed

HalideIR

Submodule HalideIR updated 1 file

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Acknowledgement
3333
---------------
3434
We learnt a lot from the following projects when building TVM.
3535
- [Halide](https://github.com/halide/Halide): TVM uses [HalideIR](https://github.com/dmlc/HalideIR) as data structure for
36-
arithematic simplification and low level lowering. HalideIR is derived from Halide.
37-
We also learns from Halide when implementing the lowering pipeline in TVM.
36+
arithematic simplification and low level lowering. We also learnt and adapted some part of lowering pipeline from Halide.
3837
- [Loopy](https://github.com/inducer/loopy): use of integer set analysis and its loop transformation primitives.
3938
- [Theano](https://github.com/Theano/Theano): the design inspiration of symbolic scan operator for recurrence.

src/codegen/llvm/codegen_llvm.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* \file codegen_llvm.cc
44
*/
55
#ifdef TVM_LLVM_VERSION
6+
// Part of the code are adapted from Halide's CodeGen_LLVM
67

78
#include <tvm/runtime/device_api.h>
89
#include <tvm/runtime/c_runtime_api.h>
@@ -492,6 +493,7 @@ llvm::Value* CodeGenLLVM::CreateBufferPtr(
492493
if (btype != ptype) {
493494
buffer = builder_->CreatePointerCast(buffer, ptype);
494495
}
496+
495497
return builder_->CreateInBoundsGEP(buffer, index);
496498
}
497499

src/pass/inject_prefetch.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright (c) 2017 by Contributors
33
* \file inject_prefetch.cc
44
*/
5+
// Inject prefetch op in HalideIR
56
#include <tvm/ir.h>
67
#include <tvm/ir_mutator.h>
78
#include <tvm/ir_visitor.h>

src/pass/storage_flatten.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright (c) 2016 by Contributors
33
* \file storage_flatten.cc
44
*/
5+
// Flattens storage from multi-dimensional array to 1D
6+
// buffer access as in Halide pipeline.
57
#include <tvm/ir.h>
68
#include <tvm/expr.h>
79
#include <tvm/operation.h>

src/pass/unroll_loop.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*!
22
* Copyright (c) 2017 by Contributors
3-
* Loop unrolling.
3+
* Loop unrolling as in Halide pipeline.
44
* \file unroll_loop.cc
55
*/
6+
// Unrolls the loop as in Halide pipeline.
67
#include <tvm/ir.h>
78
#include <tvm/ir_pass.h>
89
#include <tvm/ir_mutator.h>

src/pass/vectorize_loop.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
22
* Copyright (c) 2017 by Contributors
3-
* Vectorize the loop
43
* \file vectorize_loop.cc
54
*/
5+
// Loop vectorizer as in Halide pipeline.
66
#include <tvm/ir.h>
77
#include <tvm/ir_pass.h>
88
#include <tvm/ir_mutator.h>

0 commit comments

Comments
 (0)