GithubHelp home page GithubHelp logo

Auto-tuning fails about badslam HOT 4 CLOSED

eth3d avatar eth3d commented on July 18, 2024
Auto-tuning fails

from badslam.

Comments (4)

puzzlepaint avatar puzzlepaint commented on July 18, 2024

Thanks for the detailed report. It seems that there are two different issues here. First, the failure of the Azure Kinect SDK to initialize. I googled the error message and got this, does this help?

Second, the failure of BAD SLAM to load the calibration file. It is unclear to me why this fails. The content of the file looks fine, and since it fails in line 146, the program apparently also succeeds to open the file. However, it cannot parse the text for some reason. It should however be easy to debug this by inserting some debug output around here, for example output the content of string line and the result of sscanf.

from badslam.

kirbiyik avatar kirbiyik commented on July 18, 2024

Thanks @puzzlepaint. Regarding this, I've installed the SDK using provided Debian package. It's not possible to apply that change without building from source, right?

I could not find why it cannot parse the string line properly either. I just used stringstream to parse the line. So I run the auto-tuning it produced auto_tuning_result.txt which I then copied it to the resources directory. So now program sees the parameters but again I get Cuda Error: too many resources requested for launch error. I can show the output of test if you need.

Maybe I can decrease some parameters manually? But I don't know which ones to play with. Let me append the file here so you might suggest some tweaks. I have a GeForce RTX 2080 Ti btw.

MarkDeletedSurfelsCUDAKernel 64 1 0.000855296
ResetSurfelAccumForSurfelDeletionAndRadiusUpdateCUDAKernel<true> 256 1 0.000872832
AccumulatePoseEstimationCoeffsCUDAKernel 512 1 2.45507
FlagInvalidSurfelsInAccum2CUDAKernel 1024 1 0.00171536
UpdateSurfelPositionAndDescriptorCUDAKernel 512 1 0.00588928
ResetSurfelAccumCUDAKernel 512 1 0.00317818
AccumulateSurfelNormalOptimizationCoeffsCUDAKernel 512 1 0.433616
ResetSurfelAccum0to3CUDAKernel 512 1 0.00247328
DetermineActiveSurfelsKernel 512 1 0.194624
SetSurfelInactiveKernel 512 1 0.00260352
ComputePointRadiiAndRemoveIsolatedPixelsCUDAKernel 8 8 0.0173524
CountObservationsAndFreeSpaceViolationsCUDAKernel<true> 128 1 0.0705227
ComputeNormalsCUDAKernel 8 8 0.0221777
CreateSurfelsForKeyframeCUDAWriteFreeSpotListKernel 256 1 0.00109696
CreateSurfelsForKeyframeCUDASerializingKernel 32 16 0.0718495
ComputeMinMaxDepthCUDAKernel 32 16 0.0030521
DownsampleImagesCUDAKernel 8 8 0.119278
AccumulateSurfelPositionAndDescriptorOptimizationCoeffsCUDAKernel<true> 512 1 0.952228
CreateSurfelsForKeyframeCUDACreationAppendKernel 16 8 0.0784308
AccumulatePoseEstimationCoeffsFromImagesCUDAKernel_GradientXY 16 16 0.951445
CalibrateDepthCUDAKernel 8 8 0.0174465
CompactSurfelsCUDAKernel 256 1 0.0019665
CalibrateDepthAndTransformColorToDepthCUDAKernel 32 16 0.0195476
ComputeCostAndResidualCountFromImagesCUDAKernel_GradientXY 16 16 0.187392
BilateralFilteringAndDepthCutoffCUDAKernel 8 8 0.0591326
DetermineSupportingSurfelsCUDAKernel 32 1 0.452985
UpdateSurfelNormalCUDAKernel 512 1 0.00290547
WriteNewSurfelIndexAndInitializeObservationsCUDAKernel 256 1 0.0589264
ComputeBrightnessKernel 16 16 0.10004
FilterNewSurfelsCUDAKernel 32 1 0.036166
CountObservationsForNewSurfelsCUDAKernel 32 1 3.35606

from badslam.

puzzlepaint avatar puzzlepaint commented on July 18, 2024

I don't think that it is necessary to modify the SDK. You could for example try to insert the suggested fix

    QLocale::setDefault(QLocale::C);
    setlocale(LC_ALL, "C");

here after creating the QApplication object, as it seems that the construction of QApplication performs the locale change that seems to cause this issue.

It is surprising to me that the "too many resources requested" error happens for a GeForce RTX 2080 Ti. But it is expected that the test won't work, as they will not pick up the changed parameters from the auto tuning file (as indicated in the Readme). It should work in the actual application. If you want to fix the tests, you could try to insert the following:

    boost::filesystem::path program_dir = boost::filesystem::path(argv[0]).parent_path();
    if (!CUDAAutoTuner::Instance().LoadParametersFile(
        (program_dir / "resources"  / "auto_tuning_result.txt").string().c_str())) {
      LOG(WARNING) << "No auto-tuning file found -> using default parameters."
                      " GPU performance is thus probably slightly worse than it"
                      " could be.";
    }

in the test main function here (and probably #include <libvis/cuda/cuda_auto_tuner.h>) before it runs the tests. Also, this procedure will only work if the problematic CUDA kernel is run during creation of the auto tuning file (I haven't checked this here).

from badslam.

kirbiyik avatar kirbiyik commented on July 18, 2024

It seems that your advice worked. Appreciate your help, @puzzlepaint. Also, the output is really promising. Thanks for open sourcing such a work!

from badslam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.