Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
d0dca01a
Unverified
Commit
d0dca01a
authored
Apr 28, 2019
by
Tianqi Chen
Committed by
GitHub
Apr 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LINT] recover lint error, add asf header check (#3117)
parent
fbcb67af
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
119 additions
and
4 deletions
+119
-4
docs/dev/relay_add_pass.rst
+17
-0
src/relay/pass/dependency_graph.cc
+19
-0
src/relay/pass/dependency_graph.h
+19
-0
tests/lint/add_asf_header.py
+5
-0
tests/lint/rat-excludes
+1
-0
tests/python/relay/test_pass_partial_eval.py
+17
-0
tests/scripts/task_lint.sh
+19
-1
topi/include/topi/nn/bias_add.h
+1
-1
topi/include/topi/transform.h
+4
-2
tutorials/frontend/deploy_model_on_android.py
+17
-0
No files found.
docs/dev/relay_add_pass.rst
View file @
d0dca01a
.. 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
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
.. _relay-add-pass:
Adding a Compiler Pass to Relay
...
...
src/relay/pass/dependency_graph.cc
View file @
d0dca01a
/*
* 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
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*!
* Copyright (c) 2019 by Contributors
* \file tvm/relay/pass/dependency_graph.cc
...
...
src/relay/pass/dependency_graph.h
View file @
d0dca01a
/*
* 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
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*!
* Copyright (c) 2019 by Contributors.
* \file tvm/relay/pass/dependency_graph.h
...
...
tests/lint/add_asf_header.py
View file @
d0dca01a
...
...
@@ -117,6 +117,9 @@ header_groovystyle = """
"""
.
strip
()
FMT_MAP
=
{
"cc"
:
header_cstyle
,
"h"
:
header_cstyle
,
"py"
:
header_pystyle
,
"toml"
:
header_pystyle
,
"yml"
:
header_pystyle
,
"yaml"
:
header_pystyle
,
...
...
@@ -149,6 +152,8 @@ def main(args):
print
(
"Usage: python add_asf_header.py <file_list>"
)
for
l
in
open
(
args
[
1
]):
if
l
.
startswith
(
"-----"
):
continue
if
l
.
find
(
"File:"
)
!=
-
1
:
l
=
l
.
split
(
":"
)[
-
1
]
fname
=
l
.
strip
()
...
...
tests/lint/rat-excludes
View file @
d0dca01a
...
...
@@ -39,6 +39,7 @@ MANIFEST
.gitignore
.gitmodules
.clang-format
.bash_history
rat-excludes
__init__.py
pylintrc
...
...
tests/python/relay/test_pass_partial_eval.py
View file @
d0dca01a
# 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
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import
numpy
as
np
import
tvm
from
tvm
import
relay
...
...
tests/scripts/task_lint.sh
View file @
d0dca01a
...
...
@@ -26,15 +26,31 @@ cleanup()
}
trap
cleanup 0
echo
"Check file types..."
python3 tests/lint/check_file_type.py
echo
"Check ASF license header..."
java
-jar
/bin/apache-rat.jar
-E
tests/lint/rat-excludes
-d
.
|grep
"== File"
>
/tmp/
$$
.apache-rat.txt
||
true
if
grep
--quiet
-E
"File"
/tmp/
$$
.apache-rat.txt
;
then
echo
"Need to add ASF header to the following files."
echo
"----------------File List----------------"
cat
/tmp/
$$
.apache-rat.txt
echo
"-----------------------------------------"
echo
"Use the following steps to add the headers:"
echo
"- Create file_list.txt in your text editor"
echo
"- Copy paste the above content in file-list into file_list.txt"
echo
"- python3 tests/lint/add_asf_header.py file_list.txt"
exit
-1
fi
echo
"Check codestyle of c++ code..."
make cpplint
echo
"Check codestyle of python code..."
make pylint
echo
"Check codestyle of jni code..."
make jnilint
echo
"Check documentations of c++ code..."
make doc 2>/tmp/
$$
.log.txt
...
...
@@ -42,4 +58,6 @@ grep -v -E "ENABLE_PREPROCESSING|unsupported tag" < /tmp/$$.log.txt > /tmp/$$.lo
echo
"---------Error Log----------"
cat
/tmp/
$$
.logclean.txt
echo
"----------------------------"
grep
-E
"warning|error"
< /tmp/
$$
.logclean.txt
||
true
if
grep
--quiet
-E
"warning|error"
< /tmp/
$$
.logclean.txt
;
then
exit
-1
fi
topi/include/topi/nn/bias_add.h
View file @
d0dca01a
...
...
@@ -40,7 +40,7 @@ namespace nn {
*
* \param data Tensor with shape [batch, in_dim]
* \param bias Tensor with shape [batch].
*
*
\param axis The axis to add the bias to.
* \return Tensor with shape [batch, in_dim]
*/
inline
tvm
::
Tensor
bias_add
(
const
tvm
::
Tensor
&
data
,
const
tvm
::
Tensor
&
bias
,
int
axis
)
{
...
...
topi/include/topi/transform.h
View file @
d0dca01a
...
...
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
...
...
@@ -617,6 +617,7 @@ inline Array<Tensor> split_sections(const Tensor& x,
* \param a The source array.
* \param indices The indices of the values to extract.
* \param name The name of the operation.
* \param mode The mode of to handle out of bound indices.
* \param tag The tag to mark the operation.
*
* \return A Tensor whose op member is the take operation
...
...
@@ -655,6 +656,7 @@ inline Tensor take(const Tensor& a,
* \param indices The indices of the values to extract.
* \param axis The axis over which to select values. By default,
* the flattened input array is used.
* \param mode The mode of to handle out of bound indices.
* \param name The name of the operation.
* \param tag The tag to mark the operation.
*
...
...
tutorials/frontend/deploy_model_on_android.py
View file @
d0dca01a
# 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
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""
.. _tutorial-deploy-model-on-android:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment