Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
42c7cdad
Commit
42c7cdad
authored
Jan 19, 2023
by
yan.yan
Browse files
v2.3.0: int8 quantization
parent
1f6deed6
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
676 additions
and
9 deletions
+676
-9
test/develop/dev2.py
test/develop/dev2.py
+0
-0
test/develop/mnist_int8_dev.py
test/develop/mnist_int8_dev.py
+667
-0
test/test_all_algo.py
test/test_all_algo.py
+8
-8
version.txt
version.txt
+1
-1
No files found.
test/dev2.py
→
test/
develop/
dev2.py
View file @
42c7cdad
File moved
test/develop/mnist_int8_dev.py
0 → 100644
View file @
42c7cdad
This diff is collapsed.
Click to expand it.
test/test_all_algo.py
View file @
42c7cdad
...
@@ -330,10 +330,10 @@ def _test_impgemm_conv_cuda(subm: bool):
...
@@ -330,10 +330,10 @@ def _test_impgemm_conv_cuda(subm: bool):
device
=
torch
.
device
(
"cuda:0"
)
device
=
torch
.
device
(
"cuda:0"
)
shapes
=
[[
19
,
18
,
17
]]
shapes
=
[[
19
,
18
,
17
]]
batchsizes
=
[
1
]
batchsizes
=
[
1
]
#
dtypes = [(np.float32, np.float32), (np.float16, np.float16)]
dtypes
=
[(
np
.
float32
,
np
.
float32
),
(
np
.
float16
,
np
.
float16
)]
# dtypes = [np.float16]
# dtypes = [np.float16]
dtypes
=
[(
np
.
int8
,
np
.
int8
),
(
np
.
int8
,
np
.
float32
),
(
np
.
int8
,
np
.
float16
)]
#
dtypes = [(np.int8, np.int8), (np.int8, np.float32), (np.int8, np.float16)]
dtypes
=
[(
np
.
int8
,
np
.
int8
)]
#
dtypes = [(np.int8, np.int8)]
# dtypes = [(np.float16, np.float16)]
# dtypes = [(np.float16, np.float16)]
test_case
=
TestCase
()
test_case
=
TestCase
()
...
@@ -341,19 +341,19 @@ def _test_impgemm_conv_cuda(subm: bool):
...
@@ -341,19 +341,19 @@ def _test_impgemm_conv_cuda(subm: bool):
# out_channels = [32, 48, 64]
# out_channels = [32, 48, 64]
in_channels
=
[
32
,
47
]
in_channels
=
[
32
,
47
]
out_channels
=
[
32
,
48
,
62
]
out_channels
=
[
32
,
48
,
62
]
in_channels
=
[
16
]
#
in_channels = [16]
out_channels
=
[
16
]
#
out_channels = [16]
multiple_base
=
16
multiple_base
=
16
if
subm
:
if
subm
:
# ksizes = [3, (3, 3, 5), (3, 5, 5), 5]
# ksizes = [3, (3, 3, 5), (3, 5, 5), 5]
ksizes
=
[
3
]
ksizes
=
[
3
,
5
]
strides
=
[
1
]
strides
=
[
1
]
paddings
=
[
0
]
paddings
=
[
0
]
dilations
=
[
1
]
dilations
=
[
1
]
else
:
else
:
ksizes
=
[
2
,
3
,
(
3
,
3
,
4
),
4
,
(
4
,
5
,
5
),
5
]
ksizes
=
[
2
,
3
,
(
3
,
3
,
4
),
4
,
(
4
,
5
,
5
),
5
]
ksizes
=
[
2
,
3
]
ksizes
=
[
2
,
3
,
5
]
strides
=
[
1
,
2
,
3
]
strides
=
[
1
,
2
,
3
]
paddings
=
[
0
,
1
]
paddings
=
[
0
,
1
]
...
@@ -1024,7 +1024,7 @@ def _test_native_conv_cuda(subm: bool):
...
@@ -1024,7 +1024,7 @@ def _test_native_conv_cuda(subm: bool):
def
test_all_algo_unit
():
def
test_all_algo_unit
():
# for i in range(5):
# for i in range(5):
_test_impgemm_conv_cuda
(
True
)
_test_impgemm_conv_cuda
(
True
)
#
_test_impgemm_conv_cuda(False)
_test_impgemm_conv_cuda
(
False
)
# _test_native_conv_cuda(True)
# _test_native_conv_cuda(True)
# _test_native_conv_cuda(False)
# _test_native_conv_cuda(False)
...
...
version.txt
View file @
42c7cdad
2.
2.6
2.
3.0
Prev
1
2
Next
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