Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【bug】 openmvs.py gpu_config set --cuda-device -1 or --cuda-device -2, cant use GPU #1733

Closed
xueshuai0922 opened this issue Dec 12, 2023 · 1 comment

Comments

@xueshuai0922
Copy link

xueshuai0922 commented Dec 12, 2023

How did you install ODM? (Docker, installer, natively, ...)?

docker nodeOdm

What is the problem?

【bug】 openmvs.py gpu_config set --cuda-device -1 or --cuda-device -2, cant use GPU

config = [
                "--resolution-level %s" % int(resolution_level),
                '--dense-config-file "%s"' % densify_ini_file,
                "--max-resolution %s" % int(outputs['undist_image_max_size']),
                "--max-threads %s" % args.max_concurrency,
                "--number-views-fuse %s" % number_views_fuse,
                "--sub-resolution-levels %s" % subres_levels,
                "--archive-type 3",
                '-w "%s"' % depthmaps_dir, 
                "-v 0"
            ]

            gpu_config = []
            use_gpu = has_gpu(args)
            if use_gpu:
                gpu_config.append("--cuda-device -1")
            else:
                gpu_config.append("--cuda-device -2")

            extra_config = []

            if args.pc_skip_geometric:
                extra_config.append("--geometric-iters 0")

            masks_dir = os.path.join(tree.opensfm, "undistorted", "masks")
            masks = os.path.exists(masks_dir) and len(os.listdir(masks_dir)) > 0
            if masks:
                extra_config.append("--ignore-mask-label 0")

            with open(densify_ini_file, 'w+') as f:
                f.write("Optimize = 7\n")

            def run_densify():
                system.run('"%s" "%s" %s' % (context.omvs_densify_path, 
                                        openmvs_scene_file,
                                        ' '.join(config + gpu_config + extra_config)))
    gpu_config = []
            use_gpu = has_gpu(args)
            if use_gpu:
                gpu_config.append("--cuda-device -1")

if we has a gpu ,why --cuda-device -1 ? it should be --cuda-device 0 or --cuda-device 1

image

What should be the expected behavior? If this is a feature request, please describe in detail the changes you think should be made to the code, citing files and lines where changes should be made, if possible.

cause we didnot use GPu , want to use Gpu by node-odm correctly

How can we reproduce this? What steps did you do to trigger the problem? If this is an issue with processing a dataset, YOU MUST include a copy of your dataset AND task output log, uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this).

[Type answer here]

Copy link

Could we move this conversation over to the forum at https://community.opendronemap.org? The forum is the right place to ask questions (we try to keep the GitHub issue tracker for feature requests and bugs only). Thank you!

p.s. I'm just an automated script, not a human being.

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

No branches or pull requests

1 participant