f6986146127b8b0e13f99932cea789df20c6ebd7,lib/model/roi_crop/build.py,,,#,8

Before Change



this_file = os.path.dirname(os.path.realpath(__file__))
print(this_file)
extra_objects = ["src/roi_crop_cuda_kernel.cu.o"]
extra_objects = [os.path.join(this_file, fname) for fname in extra_objects]

ffi = create_extension(
    "_ext.roi_crop",

After Change


from torch.utils.ffi import create_extension

//this_file = os.path.dirname(__file__)
torch_root = os.path.join(os.path.dirname(sys.executable),
                          "Lib/site-packages/torch/lib")
cuda_root = os.environ["CUDA_PATH"]

sources = ["src/roi_crop.cpp"]
headers = ["src/roi_crop.h"]
include_dirs = []
defines = []
with_cuda = False

this_file = os.path.dirname(os.path.realpath(__file__))
print(this_file)

if torch.cuda.is_available():
    print("Including CUDA code.")
    sources += ["src/roi_crop_cuda.cpp"]
    headers += ["src/roi_crop_cuda.h"]
    include_dirs += [os.path.join(cuda_root,"include"), 
                     os.path.join(torch_root,"include")]
    defines += [("WITH_CUDA", None)]
    with_cuda = True

extra_objects = ["src/roi_crop_cuda_kernel.lib"]
extra_objects = [os.path.join(this_file, fname) for fname in extra_objects]
extra_objects += [os.path.join(torch_root,"ATen.lib"),
                  os.path.join(cuda_root,"lib/x64/cudart.lib"),
                  os.path.join(torch_root,"_C.lib")]
print(extra_objects)

ffi = create_extension(
    "_ext.roi_crop",
    headers=headers,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 30

Instances


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: f6986146127b8b0e13f99932cea789df20c6ebd7
Time: 2018-06-05
Author: kingstarcraft@foxmail.com
File Name: lib/model/roi_crop/build.py
Class Name:
Method Name:


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: f6986146127b8b0e13f99932cea789df20c6ebd7
Time: 2018-06-05
Author: kingstarcraft@foxmail.com
File Name: lib/model/roi_crop/build.py
Class Name:
Method Name:


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: f6986146127b8b0e13f99932cea789df20c6ebd7
Time: 2018-06-05
Author: kingstarcraft@foxmail.com
File Name: lib/model/roi_pooling/build.py
Class Name:
Method Name:


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: f6986146127b8b0e13f99932cea789df20c6ebd7
Time: 2018-06-05
Author: kingstarcraft@foxmail.com
File Name: lib/model/roi_align/build.py
Class Name:
Method Name: