39dce4bad4cd2a6de06dd5c84f97cd0624865b11,networks/resample2d_package/build.py,,,#,5

Before Change


import torch
import torch.utils.ffi

strBasepath = os.path.split(os.path.abspath(__file__))[0] + "/"
strHeaders = []
strSources = []
strDefines = []
strObjects = []

if torch.cuda.is_available() == True:
    strHeaders += ["src/Resample2d_cuda.h"]
    strSources += ["src/Resample2d_cuda.c"]
    strDefines += [("WITH_CUDA", None)]
    strObjects += ["src/Resample2d_kernel.o"]

ffi = torch.utils.ffi.create_extension(
    name="_ext.resample2d",
    headers=strHeaders,
    sources=strSources,
    verbose=False,
    with_cuda=any(strDefine[0] == "WITH_CUDA" for strDefine in strDefines),
    package=False,
    relative_to=strBasepath,
    include_dirs=[os.path.expandvars("$CUDA_HOME") + "/include"],
    define_macros=strDefines,
    extra_objects=[os.path.join(strBasepath, strObject) for strObject in strObjects]
)

After Change


import torch
import torch.utils.ffi

this_folder = os.path.dirname(os.path.abspath(__file__)) + "/"

Headers = []
Sources = []
Defines = []
Objects = []

if torch.cuda.is_available() == True:
    Headers += ["src/Resample2d_cuda.h"]
    Sources += ["src/Resample2d_cuda.c"]
    Defines += [("WITH_CUDA", None)]
    Objects += ["src/Resample2d_kernel.o"]

ffi = torch.utils.ffi.create_extension(
    name="_ext.resample2d",
    headers=Headers,
    sources=Sources,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: NVIDIA/flownet2-pytorch
Commit Name: 39dce4bad4cd2a6de06dd5c84f97cd0624865b11
Time: 2017-12-05
Author: freda@gcf-maxwell-041.nvidia.com
File Name: networks/resample2d_package/build.py
Class Name:
Method Name:


Project Name: NVIDIA/flownet2-pytorch
Commit Name: 39dce4bad4cd2a6de06dd5c84f97cd0624865b11
Time: 2017-12-05
Author: freda@gcf-maxwell-041.nvidia.com
File Name: networks/resample2d_package/build.py
Class Name:
Method Name:


Project Name: NVIDIA/flownet2-pytorch
Commit Name: 39dce4bad4cd2a6de06dd5c84f97cd0624865b11
Time: 2017-12-05
Author: freda@gcf-maxwell-041.nvidia.com
File Name: networks/channelnorm_package/build.py
Class Name:
Method Name:


Project Name: NVIDIA/flownet2-pytorch
Commit Name: 39dce4bad4cd2a6de06dd5c84f97cd0624865b11
Time: 2017-12-05
Author: freda@gcf-maxwell-041.nvidia.com
File Name: networks/correlation_package/build.py
Class Name:
Method Name: