Optix/Optix Prime complie time benchmarks?

Hi,

I’m currently trying to raytrace a reasonably large mesh (maybe? I can’t find any benchmarks) of about 20 000 vertices and 40 000 faces. I’m running this on a Titan Black and it takes a few minutes to compile the acceleration structures. Is this expected?

Thanks.

Which acceleration structure are you using?
Anyway, I don’t think it’s expected. It used to take less than 3 seconds to build an SBVH accelerations structure for a 300 000 triangles mesh on a GTX 580 for my tests.

No, for acceleration structure builds that would be much too slow.
I would not consider 40,000 triangles to be large. For example a sphere with 200x100 longitudinal-latitudinal grid would be of that size. That doesn’t take more than 0.34 seconds in my renderer using Sbvh (slow builder) and 0.04 seconds with Trbvh (fast builder).

Which acceleration structure builder are you using?
OptiX supports multiple different acceleration structures. Please try Bvh, Sbvh, and Trbvh.

How are you benchmarking it?
If you just measure the first launch, that is not only the acceleration structure building time but also the kernel program compilation.
The code below is my application’s startup sequence used to time the one-time initialization.
Try adding something like this to your program and see where the time is spent. If it’s in compile, that would be the program compilation. If it’s in launch() it’s the acceleration build.

If that isn’t indicating where the time comes from, please add more information about your system and application.
Minimum information which should always be reported:
OS version, OS bitness, installed GPUs, driver version, OptiX version, CUDA version.

void Application::initScene()
{
  try
  {
    m_benchmarkTimer.restart();
    const double timeInit = m_benchmarkTimer.getTime();

    createScene();
    const double timeScene = m_benchmarkTimer.getTime();

    m_context->validate();
    const double timeValidate = m_benchmarkTimer.getTime();

    m_context->compile();
    const double timeCompile = m_benchmarkTimer.getTime();

    m_context->launch(0, 0, 0); // Dummy launch to build everything (entrypoint, width, height)
    const double timeLaunch = m_benchmarkTimer.getTime();

    std::cout << "initScene(): " << timeLaunch - timeInit << " seconds overall" << std::endl;
    std::cout << "{" << std::endl;
    std::cout << "  createScene() = " << timeScene    - timeInit     << " seconds" << std::endl;
    std::cout << "  validate()    = " << timeValidate - timeScene    << " seconds" << std::endl;
    std::cout << "  compile()     = " << timeCompile  - timeValidate << " seconds" << std::endl;
    std::cout << "  launch()      = " << timeLaunch   - timeCompile  << " seconds" << std::endl;
    std::cout << "}" << std::endl;
  }
  catch(optix::Exception& e)
  {
    std::cerr << e.getErrorString() << std::endl;
  }
}

Thanks for the pointers guys. Fortunately this one was a false alarm, I tracked it down to a rogue curand call that was keeping the card busy.