Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typo errors in license header #5956

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/tvm/relay/backend/vm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License .to the Apache Software Foundation (ASF) under one
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
Expand Down Expand Up @@ -73,6 +73,7 @@ def compile(mod, target=None, target_host=None, params=None):

class VMCompiler(object):
"""Compiler that compiles Relay module to VM executable."""

def __init__(self):
self.mod = _vm._VMCompiler()
self._lower = self.mod["lower"]
Expand Down Expand Up @@ -239,6 +240,7 @@ class VMExecutor(Executor):
target : :py:class:`Target`
The target option to build the function.
"""

def __init__(self, mod, ctx, target):
if mod is None:
raise RuntimeError("Must provide module to get VM executor.")
Expand Down
5 changes: 4 additions & 1 deletion python/tvm/runtime/profiler_vm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License .to the Apache Software Foundation (ASF) under one
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
Expand All @@ -23,12 +23,15 @@
from tvm.runtime import _ffi_api
from . import vm


def enabled():
"""Whether vm profiler is enabled."""
return hasattr(_ffi_api, "_VirtualMachineDebug")


class VirtualMachineProfiler(vm.VirtualMachine):
"""Relay profile VM runtime."""

def __init__(self, mod):
super(VirtualMachineProfiler, self).__init__(mod)
m = mod.module if isinstance(mod, vm.Executable) else mod
Expand Down
5 changes: 4 additions & 1 deletion python/tvm/runtime/vm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# License .to the Apache Software Foundation (ASF) under one
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
Expand Down Expand Up @@ -28,6 +28,7 @@
from .object import Object
from . import _ffi_api, container


def _convert(arg, cargs):
if isinstance(arg, Object):
cargs.append(arg)
Expand Down Expand Up @@ -59,6 +60,7 @@ def convert(args):

class Executable(object):
"""Relay VM executable"""

def __init__(self, mod):
self.mod = mod
self._function_params = {}
Expand Down Expand Up @@ -272,6 +274,7 @@ def get_function_params(self, func_name):

class VirtualMachine(object):
"""Relay VM runtime."""

def __init__(self, mod):
if not isinstance(mod, (Executable, tvm.runtime.Module)):
raise TypeError("mod is expected to be the type of Executable or " +
Expand Down