Unverified Commit 8a3256d8 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Add const reference for Tensor in FromCSC. (#5750)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 6f675eb7
...@@ -63,7 +63,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder { ...@@ -63,7 +63,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder {
* @return CSCSamplingGraph * @return CSCSamplingGraph
*/ */
static c10::intrusive_ptr<CSCSamplingGraph> FromCSC( static c10::intrusive_ptr<CSCSamplingGraph> FromCSC(
const torch::Tensor indptr, const torch::Tensor indices, const torch::Tensor& indptr, const torch::Tensor& indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge); const torch::optional<torch::Tensor>& type_per_edge);
......
...@@ -26,7 +26,7 @@ CSCSamplingGraph::CSCSamplingGraph( ...@@ -26,7 +26,7 @@ CSCSamplingGraph::CSCSamplingGraph(
} }
c10::intrusive_ptr<CSCSamplingGraph> CSCSamplingGraph::FromCSC( c10::intrusive_ptr<CSCSamplingGraph> CSCSamplingGraph::FromCSC(
const torch::Tensor indptr, const torch::Tensor indices, const torch::Tensor& indptr, const torch::Tensor& indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge) { const torch::optional<torch::Tensor>& type_per_edge) {
if (node_type_offset.has_value()) { if (node_type_offset.has_value()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment