mirror of
https://github.com/wassname/Pointnet2_PyTorch.git
synced 2026-08-07 11:08:13 +08:00
Updates
This commit is contained in:
+7
-3
@@ -9,7 +9,8 @@ base_dir = osp.dirname(osp.abspath(__file__))
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Arguments for building pointnet2 ffi extension")
|
||||
description="Arguments for building pointnet2 ffi extension"
|
||||
)
|
||||
parser.add_argument("--objs", nargs="*")
|
||||
clean_arg = parser.add_mutually_exclusive_group()
|
||||
clean_arg.add_argument("--build", dest='build', action="store_true")
|
||||
@@ -27,7 +28,7 @@ def build(args):
|
||||
extra_objects += [a for a in glob.glob('/usr/local/cuda/lib64/*.a')]
|
||||
|
||||
ffi = create_extension(
|
||||
'_ext',
|
||||
'_ext.pointnet2',
|
||||
headers=[a for a in glob.glob("cinclude/*_wrapper.h")],
|
||||
sources=[a for a in glob.glob("csrc/*.c")],
|
||||
define_macros=[('WITH_CUDA', None)],
|
||||
@@ -36,12 +37,15 @@ def build(args):
|
||||
extra_objects=extra_objects,
|
||||
include_dirs=[osp.join(base_dir, 'cinclude')],
|
||||
verbose=False,
|
||||
package=False)
|
||||
package=False
|
||||
)
|
||||
ffi.build()
|
||||
|
||||
|
||||
def clean(args):
|
||||
shutil.rmtree(osp.join(base_dir, "_ext"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = parse_args()
|
||||
if args.clean:
|
||||
|
||||
Reference in New Issue
Block a user