Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward-merge branch-25.04 into branch-25.06 #4989

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions python/cugraph/cugraph/layout/force_atlas2_wrapper.pyx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
# Copyright (c) 2020-2025, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -22,7 +22,7 @@ from cugraph.structure.graph_primtypes cimport *
from libcpp cimport bool
from libc.stdint cimport uintptr_t
import cudf
from numba import cuda
import cupy as cp
import numpy as np

cdef extern from "cugraph/legacy/internals.hpp" namespace "cugraph::internals":
Expand Down Expand Up @@ -67,7 +67,7 @@ def force_atlas2(input_graph,
cdef GraphCOOView[int,int,double] graph_double

df = cudf.DataFrame()
df['vertex'] = cudf.Series(np.arange(num_verts, dtype=np.int32))
df['vertex'] = cudf.Series(cp.arange(num_verts, dtype=cp.int32))

src = input_graph.edgelist.edgelist_df['src']
dst = input_graph.edgelist.edgelist_df['dst']
Expand Down Expand Up @@ -103,12 +103,12 @@ def force_atlas2(input_graph,


# We keep np.float32 as results for both cases
pos = cuda.device_array(
pos = cp.empty(
(num_verts, 2),
order="F",
dtype=np.float32)
dtype=cp.float32)

pos_ptr = pos.device_ctypes_pointer.value
pos_ptr = pos.data.ptr

if input_graph.edgelist.weights \
and input_graph.edgelist.edgelist_df['weights'].dtype == np.float64:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np
import os

import numba.cuda
from cuda.bindings import runtime as cuda_runtime

from cugraph.gnn import FeatureStore

Expand All @@ -28,8 +28,10 @@


def get_cudart_version():
major, minor = numba.cuda.runtime.get_version()
return major * 1000 + minor * 10
status, version = cuda_runtime.getLocalRuntimeVersion()
if status != cuda_runtime.cudaError_t.cudaSuccess:
raise RuntimeError(f"CUDA Error: {status}")
return version


pytestmark = [
Expand Down
Loading