| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b811f87 commit b5286ef
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,9 +98,6 @@ void prepareKernelArgs(conv_kparam_t& params, dim_t oDims[], dim_t fDims[], | |||
| 98 | 98 | (params.mThreads.y + 2 * (fDims[1] - 1)) * | |
| 99 | 99 | (params.mThreads.z + 2 * (fDims[2] - 1)) * | |
| 100 | 100 | sizeof(T); | |
| 101 | - // todo: fold into x dimension according to old style | ||
| 102 | - params.mBlocks.z = divup(params.mBlocks.y, maxBlocksY); | ||
| 103 | - params.mBlocks.y = divup(params.mBlocks.y, params.mBlocks.z); | ||
| 104 | 101 | } | |
| 105 | 102 | } | |
| 106 | 103 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -804,3 +804,23 @@ TEST(DISABLED_ConvolveLargeDim3D, CPP) { | |||
| 804 | 804 | // TODO: fix product by indexing | |
| 805 | 805 | // ASSERT_EQ(1.f, product<float>(output)); | |
| 806 | 806 | } | |
| 807 | + | ||
| 808 | + TEST(Convolve, CuboidBatchLaunchBugFix) { | ||
| 809 | + std::string testFile(TEST_DIR "/convolve/conv3d_launch_bug.test"); | ||
| 810 | + | ||
| 811 | + vector<dim4> numDims; | ||
| 812 | + vector< vector<float> > in; | ||
| 813 | + vector< vector<float> > tests; | ||
| 814 | + | ||
| 815 | + readTests<float, float, float>(testFile, numDims, in, tests); | ||
| 816 | + | ||
| 817 | + dim4 sDims = numDims[0]; | ||
| 818 | + dim4 fDims = numDims[1]; | ||
| 819 | + | ||
| 820 | + af::array signal(sDims, in[0].data()); | ||
| 821 | + af::array filter(fDims, in[1].data()); | ||
| 822 | + | ||
| 823 | + af::array output = convolve3(signal, filter); | ||
| 824 | + | ||
| 825 | + ASSERT_VEC_ARRAY_NEAR(tests[0], sDims, output, 1.0e-3); | ||
| 826 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments