| 205 | constexpr auto M = Convolution3D::Mode::CROSS_CORRELATION; |
| 206 | |
| 207 | TEST_F(CUDA, CHANWISE_CONVOLUTION3D_FORWARD) { |
| 208 | constexpr auto M = Convolution3D::Mode::CROSS_CORRELATION; |
| 209 | Checker<Convolution3D> checker(handle_cuda()); |
| 210 | bool require_algo = false; |
| 211 | checker.set_before_exec_callback( |
| 212 | AlgoChecker<Convolution3DForward>("CHANNEL_WISE", &require_algo)); |
| 213 | checker.set_param(gconv_param({M, 0, 0, 0, 1, 1, 1})) |
| 214 | .execs({{1, 1, 2, 2, 2}, {1, 1, 1, 2, 2, 2}, {}}) |
| 215 | .execs({{1, 1, 5, 5, 5}, {1, 1, 1, 2, 2, 2}, {}}); |
| 216 | checker.set_param(gconv_param({M, 0, 0, 0, 1, 1, 1})) |
| 217 | .execs({{1, 2, 2, 2, 2}, {2, 1, 1, 2, 2, 2}, {}}) |
| 218 | .execs({{1, 2, 5, 5, 5}, {2, 1, 1, 2, 2, 2}, {}}) |
| 219 | .execs({{2, 2, 5, 5, 5}, {2, 3, 1, 2, 2, 2}, {2, 6, 4, 4, 4}}); |
| 220 | |
| 221 | checker.set_param(gconv_param({M, 1, 1, 1, 1, 1, 1})) |
| 222 | .execs({{2, 2, 5, 5, 5}, {2, 1, 1, 2, 2, 2}, {}}); |
| 223 | |
| 224 | checker.set_param(gconv_param({M, 2, 3, 3, 2, 1, 1})) |
| 225 | .execs({{4, 12, 10, 5, 10}, {12, 2, 1, 4, 5, 5}, {}}); |
| 226 | |
| 227 | // padding larger than kern |
| 228 | checker.set_param(gconv_param({M, 10, 15, 15, 4, 5, 5})) |
| 229 | .execs({{4, 12, 10, 5, 10}, {12, 2, 1, 4, 5, 5}, {}}); |
| 230 | |
| 231 | for (uint32_t n : {8, 12}) |
| 232 | for (uint32_t id : {12}) |
| 233 | for (uint32_t ih : {12}) |
| 234 | for (uint32_t iw : {16}) |
| 235 | for (uint32_t ic : {4}) |
| 236 | for (uint32_t oc : {4}) |
| 237 | for (uint32_t fd : {2, 5}) |
| 238 | for (uint32_t pd : {2}) |
| 239 | for (uint32_t sd : {1}) |
| 240 | for (uint32_t dd : {1}) { |
| 241 | checker |
| 242 | .set_param(gconv_param( |
| 243 | {M, pd, pd, pd, sd, sd, sd, |
| 244 | dd, dd, dd})) |
| 245 | .execs({{n, ic, id, ih, iw}, |
| 246 | {ic, oc, 1, fd, fd, fd}, |
| 247 | {}}); |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | TEST_F(CUDA, CHANWISE_CONVOLUTION3D_BACKWARD_DATA) { |
| 252 | Checker<Convolution3DBackwardData> checker(handle_cuda()); |
nothing calls this directly
no test coverage detected