1 parent 3b34b85 commit cd12946Copy full SHA for cd12946
5 files changed
operatorspy/tests/avg_pool.py
@@ -152,10 +152,6 @@ def test(
152
elapsed = (time.time() - start_time) / NUM_ITERATIONS
153
print(f" lib time: {elapsed :6f}")
154
155
-
156
- print(x)
157
- print(y)
158
- print(ans)
159
assert torch.allclose(y, ans, atol=0, rtol=1e-3)
160
check_error(lib.infiniopDestroyAvgPoolDescriptor(descriptor))
161
@@ -205,7 +201,7 @@ def test_musa(lib, test_cases):
205
201
# ((1, 1, 10), (3,), (1,), (1,)),
206
202
((1, 1, 2, 2), (2, 2), (1, 1), (1, 1)),
207
203
((32, 4, 224, 224), (3, 3), (1, 1), (2, 2)),
208
- ((1, 1, 16, 16, 16), (5, 5, 5), (2, 2, 2), (2, 2, 2)),
204
+ # ((1, 1, 16, 16, 16), (5, 5, 5), (2, 2, 2), (2, 2, 2)),
209
]
210
args = get_args()
211
lib = open_lib()
operatorspy/tests/global_avg_pool.py
@@ -158,7 +158,8 @@ def test_musa(lib, test_cases):
test_cases = [
# x_shape
((1, 1, 2, 2)),
- # ((1, 3, 3)),
+ ((1, 3, 3, 6)),
162
+ ((8, 4, 6, 12)),
163
# ((1, 3, 1, 1, 3)),
164
# ((1, 3, 1, 1, 257)),
165
# ((1, 2, 1, 1, 514)),
operatorspy/tests/max_pool.py
@@ -148,9 +148,9 @@ def test(
148
)
149
150
151
+ # print(x)
+ # print(y)
+ # print(ans)
check_error(lib.infiniopDestroyMaxPoolDescriptor(descriptor))
@@ -198,7 +198,9 @@ def test_musa(lib, test_cases):
198
199
# x_shape, kernel_shape, padding, strides
200
- # ((32, 3, 224, 224), (3, 3), (1, 1), (2, 2)),
+ ((32, 3, 224, 224), (3, 3), (1, 1), (2, 2)),
+ ((1, 3, 6, 6), (3, 3), (1, 1), (2, 2)),
+ ((8, 3, 12, 12), (3, 3), (1, 1), (2, 2)),
((1, 1, 4, 4), (2, 2), (0, 0), (1, 1)),
# ((1, 1, 16, 16, 16), (5, 5, 5), (2, 2, 2), (2, 2, 2)),
src/ops/add/musa/add_musa.mu
@@ -84,6 +84,7 @@ void _add_mt_gpu(AddMusaDescriptor_t desc, Tdata *c, Tdata const *a, Tdata const
84
add<Tdata, BTdata><<<gridDims, blockDims, 0, musa_stream>>>(
85
c, a, b, desc->a_strides, desc->b_strides, desc->c_strides, offset + data_size, desc->ndim, offset + i, desc->broadcasted, pack_size);
86
}
87
+ printf("[SUCCESS to execute add_mt_gpu]\n");
88
89
90
template<typename Tdata, typename TIdata>
src/ops/pooling/musa/pooling_musa.h
@@ -46,6 +46,7 @@ inline musa::dnn::Pooling::Mode getPoolingMode(int pooling_type) {
46
return musa::dnn::Pooling::Mode::MAXPOOL;
47
case 1:
48
return musa::dnn::Pooling::Mode::AVGPOOL_COUNT_PAD;
49
+ // return musa::dnn::Pooling::Mode::AVGPOOL_COUNT_WITHOUT_PAD;
50
default:
51
52
0 commit comments