ignacio-rocco/detectorch

No such file or directory: 'detectorch/lib/cppcuda/build/build.ninja'

lukasbrchl opened this issue · 1 comments

Hi,

firstly, thank you for your work. I have tried your code, but I cannot get it working. It looks like that the file build.ninja cannot be created. Don't you have please any idea why it is happening?

Using PyTorch 0.4, Ubuntu 16.4, Anaconda with all requirements installed.

Output of first cell from demo.ipynb
`
compiling/loading roi_align
Detected CUDA files, patching ldflags
Emitting ninja build file /home/lukas/dev/detectorch/lib/cppcuda/build/build.ninja...

FileNotFoundError Traceback (most recent call last)
in ()
12 from utils.utils import to_cuda_variable
13 from utils.json_dataset_evaluator import evaluate_boxes,evaluate_masks
---> 14 from model.detector import detector
15 import utils.result_utils as result_utils
16 import utils.vis as vis_utils

~/dev/detectorch/lib/model/detector.py in ()
3 import numpy as np
4 import torchvision.models as models
----> 5 from model.roi_align import RoIAlignFunction, preprocess_rois
6 from model.generate_proposals import GenerateProposals
7 from model.collect_and_distribute_fpn_rpn_proposals import CollectAndDistributeFpnRpnProposals

~/dev/detectorch/lib/model/roi_align.py in ()
16 'lib/cppcuda/roi_align_forward_cuda.cu',
17 'lib/cppcuda/roi_align_backward_cuda.cu'],
---> 18 build_directory=build_path,verbose=True)
19 else:
20 import cppcuda_cffi.roialign as roialign

~/anaconda3/envs/darknetTracking/lib/python3.6/site-packages/torch/utils/cpp_extension.py in load(name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, build_directory, verbose)
493 extra_ldflags=extra_ldflags or [],
494 extra_include_paths=extra_include_paths or [],
--> 495 with_cuda=with_cuda)
496
497 if verbose:

~/anaconda3/envs/darknetTracking/lib/python3.6/site-packages/torch/utils/cpp_extension.py in _write_ninja_file(path, name, sources, extra_cflags, extra_cuda_cflags, extra_ldflags, extra_include_paths, with_cuda)
671 blocks.append(cuda_compile_rule)
672 blocks += [link_rule, build, link, default]
--> 673 with open(path, 'w') as build_file:
674 for block in blocks:
675 lines = '\n'.join(block)

FileNotFoundError: [Errno 2] No such file or directory: '/home/lukas/dev/detectorch/lib/cppcuda/build/build.ninja'`

Sorry to bother you. It just needed to create the "build" directory detectorch/lib/cppcuda/build/ and now it works.