Example #1
0
if not os.path.isdir(CUDA_HOME):
    raise OSError("Invalid CUDA_HOME: "
                  "directory does not exist: {CUDA_HOME}")

cuda_include_dir = os.path.join(CUDA_HOME, "include")
cuda_lib_dir = os.path.join(CUDA_HOME, "lib64")

# Optional location of C++ build folder that can be configured by the user
libcugraph_path = get_environment_option('CUGRAPH_BUILD_PATH')
# Optional location of RAFT that can be confugred by the user
raft_path = get_environment_option('RAFT_PATH')

# FIXME: This could clone RAFT, even if it's not needed (eg. running --clean).
# deprecated: This functionality will go away after
# https://github.com/rapidsai/raft/issues/83
raft_include_dir = use_raft_package(raft_path, libcugraph_path)

if not libcugraph_path:
    libcugraph_path = conda_lib_dir


class CleanCommand(Command):
    """Custom clean command to tidy up the project root."""
    user_options = [
        ('all', None, None),
    ]

    def initialize_options(self):
        self.all = None

    def finalize_options(self):
Example #2
0
    )

cuda_include_dir = os.path.join(CUDA_HOME, "include")

if (os.environ.get('CONDA_PREFIX', None)):
    conda_prefix = os.environ.get('CONDA_PREFIX')
    conda_include_dir = conda_prefix + '/include'
    conda_lib_dir = conda_prefix + '/lib'

# Optional location of C++ build folder that can be configured by the user
libcugraph_path = get_environment_option('CUGRAPH_BUILD_PATH')
# Optional location of RAFT that can be confugred by the user
raft_path = get_environment_option('RAFT_PATH')

# FIXME: This could clone RAFT, even if it's not needed (eg. running --clean).
raft_include_dir = use_raft_package(raft_path, libcugraph_path,
                                    git_info_file='../cpp/CMakeLists.txt')


class CleanCommand(Command):
    """Custom clean command to tidy up the project root."""
    user_options = [('all', None, None), ]

    def initialize_options(self):
        self.all = None

    def finalize_options(self):
        pass

    def run(self):
        setupFileDir = os.path.dirname(os.path.abspath(__file__))
        os.chdir(setupFileDir)
Example #3
0
    # need to terminate script so cythonizing doesn't get triggered after
    # cleanup unintendedly
    sys.argv.remove("clean")

    if "--all" in sys.argv:
        sys.argv.remove("--all")

    if len(sys.argv) == 1:
        sys.exit(0)

##############################################################################
# - Cloning RAFT and dependencies if needed ----------------------------------

# Use RAFT repository in cuml.raft

raft_include_dir = use_raft_package(raft_path, libcuml_path)

##############################################################################
# - Cython extensions build and parameters -----------------------------------

# cumlcomms and nccl are still needed for multigpu algos not based
# on libcumlprims
libs = ['cuda', 'cuml++', 'rmm']

include_dirs = [
    '../cpp/src', '../cpp/include', '../cpp/src_prims', raft_include_dir,
    '../cpp/comms/std/src', '../cpp/comms/std/include', cuda_include_dir,
    numpy.get_include(),
    os.path.dirname(sysconfig.get_path("include"))
]
Example #4
0
File: setup.py Project: teju85/cuml
    # need to terminate script so cythonizing doesn't get triggered after
    # cleanup unintendedly
    sys.argv.remove("clean")

    if "--all" in sys.argv:
        sys.argv.remove("--all")

    if len(sys.argv) == 1:
        sys.exit(0)

##############################################################################
# - Cloning RAFT and dependencies if needed ----------------------------------

# Use RAFT repository in cuml.raft

use_raft_package(raft_path, libcuml_path)

# Use treelite from the libcuml build folder, otherwise clone it
# Needed until there is a treelite distribution

treelite_path, _ = clone_repo_if_needed('treelite', libcuml_path)
treelite_path = os.path.join(treelite_path, "include")


##############################################################################
# - Cython extensions build and parameters -----------------------------------

# cumlcomms and nccl are still needed for multigpu algos not based
# on libcumlprims
libs = ['cuda',
        'cuml++',