Skip to content

Commit

Permalink
[REFACTOR] driver.h -> driver_api.h
Browse files Browse the repository at this point in the history
"driver" normally refers to the "main" function.
Rationale: the header exposes set of APIs to drive compilation
and should be named as driver api to best reflect its usage.
  • Loading branch information
tqchen committed Jan 21, 2020
1 parent e4d817d commit d0ae3a4
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions include/tvm/driver/driver.h → include/tvm/driver/driver_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
*/

/*!
* \file tvm/driver/driver.h
* \brief Compiler driver utilities.
* \file tvm/driver/driver_api.h
* \brief Compiler driver APIs to drive the compilation.
*
* This module provides end-to-end utils to drive the compilation process.
* We adopt the term "compiler driver" in common compiler infrastructures.
* Note that a compiler driver is different from "runtime drivers".
* Most of runtime related code are defined in the runtime folder instead.
*/
#ifndef TVM_DRIVER_DRIVER_H_
#define TVM_DRIVER_DRIVER_H_
#ifndef TVM_DRIVER_DRIVER_API_H_
#define TVM_DRIVER_DRIVER_API_H_

#include <tvm/runtime/packed_func.h>
#include <tvm/target/target.h>
Expand Down Expand Up @@ -115,4 +115,4 @@ TVM_DLL runtime::Module build(const Map<std::string, Array<tir::LoweredFunc>>& i
const BuildConfig& config);
} // namespace tvm

#endif // TVM_DRIVER_DRIVER_H_
#endif // TVM_DRIVER_DRIVER_API_H_
2 changes: 1 addition & 1 deletion src/api/api_lang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <tvm/top/schedule.h>
#include <tvm/runtime/registry.h>

#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/tir/data_layout.h>


Expand Down
4 changes: 2 additions & 2 deletions src/driver/driver.cc → src/driver/driver_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

/*!
* Compile executable modules.
* \file driver.cc
* \file driver_api.cc
*/
#include <dmlc/thread_local.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/top/operation.h>
#include <tvm/tir/ir_pass.h>
#include <tvm/target/codegen.h>
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/build_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* \brief Code generation for TVM's graph runtime.
*/
#include <tvm/relay/analysis.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/runtime/device_api.h>
#include <tvm/runtime/vm.h>
#include <tvm/relay/expr.h>
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/compile_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <tvm/relay/expr_functor.h>
#include <tvm/relay/op.h>
#include <tvm/relay/op_attr_types.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>

#include <topi/tags.h>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/interpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <tvm/relay/analysis.h>
#include <tvm/relay/attrs/debug.h>
#include <tvm/relay/feature.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>

#include "compile_engine.h"

Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <dmlc/json.h>
#include <tvm/relay/expr.h>
#include <tvm/relay/type.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/target/codegen.h>
#include <tvm/tir/ir_pass.h>
#include <tvm/top/operation.h>
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/vm/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <tvm/relay/transform.h>
#include <tvm/runtime/vm.h>
#include <tvm/relay/attrs/memory.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>

#include <iostream>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/build_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <topi/cuda/injective.h>
#include <tvm/top/operation.h>
#include <tvm/runtime/registry.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>

#include <string>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/relay_build_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include <gtest/gtest.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/top/operation.h>
#include <tvm/relay/expr.h>
#include <tvm/relay/type.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/relay_transform_sequential.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <gtest/gtest.h>
#include <topi/generic/injective.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/relay/expr.h>
#include <tvm/ir/module.h>
#include <tvm/relay/analysis.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/utvm_runtime_standalone_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <gtest/gtest.h>
#include <topi/generic/injective.h>
#include <tvm/driver/driver.h>
#include <tvm/driver/driver_api.h>
#include <tvm/top/operation.h>
#include <tvm/relay/analysis.h>
#include <tvm/relay/expr.h>
Expand Down

0 comments on commit d0ae3a4

Please sign in to comment.