In this pull request, I changed the following things.
Entirely remove CodeBuilder. Originally, the CodeBuilder module contains two parts, which are the imperative DSL and some properties belonging to a stage such as var_dict and axis_list. Now all the imperative DSL is merged with dsl.py. In addition, a new module Stage is created for those properties. Module Stage can be found in schedule.py.
For all compute APIs (e.g., compute, update, etc.), it either returns a new tensor or None. Each compute API itself is a stage built by the Stage module, which creates an ExternOp object. From now on, it should be very clear that a Tensor is different from a Stage.
Users should use hcl.init() before each algorithm definition. To be more specific, users do not need to use hcl.init() again if they are building different schedules for the same algorithm. However, if they want to run several algorithms sequentially, they need to call hcl.init(). With this new command, now HeteroCL automatically detects the final stage. Namely, users do not need to specify that during create_schedule and related APIs.
Simplify tvm.Tensor, which becomes tvm._Tensor after this pull request. Now it is just a module for C/Python interface. The real computations happen in heterocl.Tensor.
In this pull request, I changed the following things.
Entirely remove
CodeBuilder
. Originally, theCodeBuilder
module contains two parts, which are the imperative DSL and some properties belonging to a stage such asvar_dict
andaxis_list
. Now all the imperative DSL is merged withdsl.py
. In addition, a new moduleStage
is created for those properties. ModuleStage
can be found inschedule.py
.For all compute APIs (e.g.,
compute
,update
, etc.), it either returns a new tensor orNone
. Each compute API itself is a stage built by theStage
module, which creates anExternOp
object. From now on, it should be very clear that aTensor
is different from aStage
.Users should use
hcl.init()
before each algorithm definition. To be more specific, users do not need to usehcl.init()
again if they are building different schedules for the same algorithm. However, if they want to run several algorithms sequentially, they need to callhcl.init()
. With this new command, now HeteroCL automatically detects the final stage. Namely, users do not need to specify that duringcreate_schedule
and related APIs.Simplify
tvm.Tensor
, which becomestvm._Tensor
after this pull request. Now it is just a module for C/Python interface. The real computations happen inheterocl.Tensor
.