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
81b42bc3
Commit
81b42bc3
authored
Aug 14, 2018
by
Pariksheet Pinjari
Committed by
Yizhi Liu
Aug 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split_indices negative axis added (#1595)
parent
60769b77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
topi/include/topi/transform.h
+5
-0
topi/tests/python_cpp/test_topi_transform.py
+1
-0
No files found.
topi/include/topi/transform.h
View file @
81b42bc3
...
...
@@ -475,6 +475,11 @@ inline Array<Tensor> split_sections(const Tensor& x,
int
axis
,
std
::
string
name
=
"tensor"
,
std
::
string
tag
=
kInjective
)
{
if
(
axis
<
0
)
{
axis
+=
static_cast
<
int
>
(
x
->
shape
.
size
());
}
CHECK_LT
(
axis
,
x
->
shape
.
size
())
<<
"axis out of bounds"
;
auto
src_axis_size
=
static_cast
<
int
>
(
GetConstInt
(
x
->
shape
[
axis
]));
CHECK_GT
(
num_sections
,
0
)
<<
"Slice count must be > 0"
;
...
...
topi/tests/python_cpp/test_topi_transform.py
View file @
81b42bc3
...
...
@@ -340,6 +340,7 @@ def test_concatenate():
def
test_split
():
verify_split
((
2
,
12
,
3
),
3
,
1
)
verify_split
((
2
,
12
,
3
),
3
,
-
1
)
verify_split
((
2
,
12
,
3
),
[
2
,
4
],
1
)
verify_split
((
10
,
12
,
24
),
[
5
,
7
,
9
],
-
1
)
...
...
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