tqchen commented on code in PR #16815: URL: https://github.com/apache/tvm/pull/16815#discussion_r1544110894
########## 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: what happens if shape_expr is nullptr? -- 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: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org