vinx13 commented on code in PR #16815:
URL: https://github.com/apache/tvm/pull/16815#discussion_r1544097312


##########
src/runtime/relax_vm/cuda/cuda_graph_builtin.cc:
##########
@@ -31,6 +31,46 @@ namespace tvm {
 namespace runtime {
 namespace relax_vm {
 
+struct CUDAGraphCaptureKey {
+  int64_t index;
+  ShapeTuple shape_expr;
+
+  CUDAGraphCaptureKey(int64_t index, const Optional<ShapeTuple>& shape_expr) : 
index(index) {
+    if (shape_expr) {
+      this->shape_expr = shape_expr.value();
+    }
+  }
+
+  bool operator==(const CUDAGraphCaptureKey& other) const {
+    return index == other.index && std::equal(shape_expr.begin(), 
shape_expr.end(),
+                                              other.shape_expr.begin(), 
other.shape_expr.end());

Review Comment:
   this overload of `std::equal` check the two range of the same size



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to