-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add generic edge properties object #4767
base: branch-24.12
Are you sure you want to change the base?
Add generic edge properties object #4767
Conversation
…operties object that utilizes them
cugraph_data_type_id_t t, | ||
size_t size) | ||
{ | ||
return (t == BOOL) ? rmm::device_buffer(cugraph::packed_bool_size(size) * data_type_size(t), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cugraph::packed_bool_size(size) * data_type_size(t)
, should data_type_size(t)
here be sizeof(uint32_t)
?
/** | ||
* Class wrapping a type-erased device vector. | ||
* */ | ||
class device_vector_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure device_vector
is a right name for type erased edge property vector. device_vector
reminds me of thrust::device_vector
or rmm::device_uvector
. They are not type-erased vectors.
We may need a better name. My suggestions: edge_property_buffer
or property_buffer
or cugraph::device_buffer
. rmm::device_buffer
does not assume a specific type and may be more appropriate for type erased data types. Or we may use column
(adopt column from cudf::column
). In cuDF C++, they use cudf::column
to store cuDF series. We may say edge_property_column
or property_column
or cugraph::device_column
or just cugraph::column
. In this case, we may rename the above allocate_buffer
function to allocate_column_buffer
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we need more discussion about this naming.
T const* begin() const | ||
{ | ||
return reinterpret_cast<T const*>(data_.data()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may add cbegin() and cend() as well.
Adding features to support type-erased edge properties within cugraph.
Temporal graph support would require adding 2 additional edge properties. This would result in 4x compile time and code size for functions that manipulate edge properties during the graph creation process.
This PR adds some new features to cugraph to reduce this compile time and provide the basis for adding the temporal edge properties to the graph in an efficient manner: