Unverified Commit add12e57 authored by Muhammed Fatih BALIN's avatar Muhammed Fatih BALIN Committed by GitHub
Browse files

[GraphBolt] Remove unique requirement from in_subgraph. (#7222)

parent 329d718e
...@@ -447,10 +447,6 @@ class FusedCSCSamplingGraph(SamplingGraph): ...@@ -447,10 +447,6 @@ class FusedCSCSamplingGraph(SamplingGraph):
nodes = self._convert_to_homogeneous_nodes(nodes) nodes = self._convert_to_homogeneous_nodes(nodes)
# Ensure nodes is 1-D tensor. # Ensure nodes is 1-D tensor.
assert nodes.dim() == 1, "Nodes should be 1-D tensor." assert nodes.dim() == 1, "Nodes should be 1-D tensor."
# Ensure that there are no duplicate nodes.
assert len(torch.unique(nodes)) == len(
nodes
), "Nodes cannot have duplicate values."
_in_subgraph = self._c_csc_graph.in_subgraph(nodes) _in_subgraph = self._c_csc_graph.in_subgraph(nodes)
return self._convert_to_sampled_subgraph(_in_subgraph) return self._convert_to_sampled_subgraph(_in_subgraph)
......
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