Commit 42c7cdad authored by yan.yan's avatar yan.yan
Browse files

v2.3.0: int8 quantization

parent 1f6deed6
This diff is collapsed.
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment