def test_stride2x3(request, tensile_client_dir, tmp_path): z = {} # problemType definition conv = Convolution(z, 'ConvolutionForward', config={ 'TensorAFormat': 'NCHW', 'Filter': '1x1', 'Stride': '2x3', 'Dilation': '1x1', 'Spatial': '17x31', }) log.debug(conv.printUsage(z)) YamlBuilder.run_convolution_vs_contraction(request, conv, z, tensile_client_dir, tmp_path)
def test_filter_stride_dilation_0(request, tensile_client_dir, tmp_path): z = {} # problemType definition conv = Convolution(z, 'ConvolutionForward', config={ 'TensorAFormat': 'NCHW', 'TensorBFormat': 'KCYX', 'TensorDFormat': 'NCHW', 'Filter': '2x3', 'Stride': '2x3', 'Dilation': '2x3', 'Spatial': '17x31', }) assert (z['NumIndicesC'] == 4) assert (z['IndexAssignmentsA'] == [6, 5, 0, 1, 4, 3]) assert (z['IndexAssignmentsB'] == [6, 5, 4, 2, 3]) assert (z['SetConstStrideA'] == [[0, 3], [6, 3]]) assert (z['SetConstStrideB'] == [[3, 0]]) assert (z['UseInitialStrides'] == True) log.debug(conv.printUsage(z)) YamlBuilder.run_convolution_vs_contraction(request, conv, z, tensile_client_dir, tmp_path)