Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac authored and zhiics committed Dec 12, 2019
1 parent a521d3a commit 98588ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/relay/backend/contrib/contrib_codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class ExternSourcePrinter {
}

/*!
* \briefa A common interface that that used by various external runtime to
* \brief A common interface that is used by various external runtime to
* generate the wrapper to invoke external kernels.
*
* \param subgraph_id The unique id of an external function. It will be used
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/contrib/csource/codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class CSourceCodegen : public ExternCodegenBase {
code_stream_ << builder.JIT();
}

runtime::Module CreateExternModule(const NodeRef& ref) {
runtime::Module CreateExternModule(const NodeRef& ref) override {
// Create headers
code_stream_ << "#include <cstdint>\n";
code_stream_ << "#include <iostream>\n";
Expand Down
4 changes: 2 additions & 2 deletions src/relay/backend/contrib/dnnl/codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ class DNNLCodegen : public ExternCodegenBase {
* to compile the generated C source code, users need to specify the paths to
* some libraries, including some TVM required and dnnl specific ones. To make
* linking simpiler, the DNNL kernels are wrapped in a TVM compatible manner
* and are live under include/tvm/runtime/contrib/dnnl folder.
* and live under tvm/src/runtime/contrib/dnnl folder.
*
* \param ref A object ref that could be either a Relay function or module.
*
* \return The runtime module that contains C source code.
*/
runtime::Module CreateExternModule(const NodeRef& ref) {
runtime::Module CreateExternModule(const NodeRef& ref) override {
// Create headers
code_stream_ << "#include <cstdint>\n";
code_stream_ << "#include <cstdlib>\n";
Expand Down
5 changes: 5 additions & 0 deletions tests/python/relay/test_external_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.
"""Unit tests for graph partitioning."""
import os
import sys
import numpy as np
import pytest

Expand All @@ -26,6 +27,10 @@
from tvm.contrib import util

def check_result(mod, map_inputs, out_shape, result, tol=1e-5):
if sys.platform == "win32":
print("Skip test on Windows for now")
return

with relay.build_config(opt_level=3, disabled_pass=["AlterOpLayout"]):
json, lib, _ = relay.build(mod, "llvm")
test_dir = os.path.dirname(os.path.realpath(os.path.expanduser(__file__)))
Expand Down

0 comments on commit 98588ca

Please sign in to comment.