Skip to content

fix: disp buffer sized by engine dtype but passed to float kernels - #67

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/ffs-depth-single-tensorrt-f2b56818
Open

andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/ffs-depth-single-tensorrt-f2b56818

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: disp buffer sized by engine dtype but passed to float kernels

Fix

Replace:

    const size_t disp_bytes = H * W * elementSize(engine_->getTensorDataType("disp"));
    cudaMallocChecked(reinterpret_cast<void**>(&d_disp_), disp_bytes, "d_disp_");

with:

    if (engine_->getTensorDataType("disp") != nvinfer1::DataType::kFLOAT) {
        throw std::runtime_error("[FFS single] disp tensor must be FP32");
    }
    const size_t disp_bytes = H * W * sizeof(float);
    cudaMallocChecked(reinterpret_cast<void**>(&d_disp_), disp_bytes, "d_disp_");

Files changed

  • cpp/src/ffs_depth_single_tensorrt.cpp

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:12
@andrewwhitecdw

Copy link
Copy Markdown
Author

Closing this sweep-generated PR: sole commit is missing a valid Signed-off-by trailer. It does not meet the sweep requirements (single signed-off commit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant