ApplyInverseOperator doesn't work if x-range is odd

Issue #26 new
Caleb Rottman created an issue

Given a Field3D f such that f.size() = Vec3D(m,n,1), ApplyInverseOperator(f) fails silently (returns f) when m is odd

Try running the attached code to see if it also fails for you.

Comments (11)

  1. Jacob Hinkle

    @crottman what is your GPU and what is CUDA_ARCH_VERSION set to? In my experience if you have a newer card and compile for an older arch code will run and give garbage output. I'll try this test out in a sec

  2. Jacob Hinkle

    I ran the test. How do I know if it fails or not? I Just get this output:

    Vec3D(253,253,1)
    Vec3D(254,253,1)
    Vec3D(255,253,1)
    Vec3D(253,254,1)
    Vec3D(254,254,1)
    Vec3D(255,254,1)
    Vec3D(253,255,1)
    Vec3D(254,255,1)
    Vec3D(255,255,1)
    
  3. Sam Preston

    (Reply via js...@sci.utah.edu):

    I think the images with odd x dimensions should look markedly different if it fails -- you can see in my results all the images look pretty much the same

    On Fri, Feb 15, 2013 at 10:33 AM, Jacob Hinkle

  4. Caleb Rottman reporter

    My CUDA version is 4.2 and I'm running this on a GTX 480. I think i'll try to install CUDA 5 and see if that fixes it. I did try running this on the CPU and it runs fine.

  5. Jacob Hinkle

    OK I'm on Archlinux with cuda 4.2 and a gtx 480. I can confirm this bug is reproducible using caleb's script. I can also confirm that it's not a CUDA_ARCH_VERSION issue. With the arch set to 12 I get http://i.imgur.com/M7VEKqs.png

    with 20 I get this http://i.imgur.com/6UrGVTy.png

    These are the same (up to reordering of the windows). I'm going to upgrade cuda to 5.0 and see if that effects it.

  6. Caleb Rottman reporter

    my CUDA_ARCH_VERSION is 12, same as Jacob.

    I have updated the CpuGpuUnitTest so that it tests on odd dimension images. Running the unit test now fails on my machine. (failing at test_DiffOP and test_JacDet)

    python -m unittest discover -v -p '*UnitTest.py'
    
  7. Caleb Rottman reporter

    I updated to CUDA 5 and did a fresh build of PyCA, and it looks like it fixed it. It now passes test_DiffOP (but still fails test_JacDet, looks like some sort of boundary issue, but i think i unrelated). Just to be sure, can someone else run the above command to see if all tests pass?

  8. Sam Preston

    If this is a reproducible bug for CUDA < 5.0, we should probably throw an exception if the CUDA version is less than 5 and there's an odd x-dimension. Are we confident that this is the issue?

  9. Caleb Rottman reporter

    I'm pretty confident the issue is CUDA < 5, because that was the only change I made between the working and non-working versions.

  10. Log in to comment