You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

debug_grpc.proto 1.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. syntax = "proto3";
  17. package debugger;
  18. import "debug_graph.proto";
  19. service EventListener {
  20. rpc WaitCMD (Metadata) returns (EventReply) {};
  21. rpc SendMetadata (Metadata) returns (EventReply) {};
  22. rpc SendGraph (GraphProto) returns (EventReply) {};
  23. rpc SendTensors (stream TensorProto) returns (EventReply) {};
  24. rpc SendWatchpointHits (stream WatchpointHit) returns (EventReply) {};
  25. }
  26. message Metadata {
  27. string device_name = 1;
  28. int32 cur_step = 2;
  29. }
  30. message EventReply {
  31. enum Status {
  32. OK = 0;
  33. FAILED = 1;
  34. PENDING = 2;
  35. }
  36. Status status = 1;
  37. oneof cmd {
  38. bool exit = 2;
  39. int32 run_cmd = 3;
  40. SetCMD set_cmd = 4;
  41. ViewCMD view_cmd = 5;
  42. }
  43. }
  44. message SetCMD {
  45. repeated WatchNode watch_nodes = 1;
  46. WatchCondition watch_condition = 2;
  47. bool delete = 3;
  48. int32 id = 4;
  49. }
  50. message ViewCMD {
  51. repeated TensorProto tensors = 1;
  52. }
  53. message WatchCondition {
  54. enum Condition {
  55. nan = 0;
  56. inf = 1;
  57. }
  58. Condition condition = 1;
  59. }
  60. message WatchNode {
  61. string node_name = 1;
  62. string node_type = 2;
  63. }
  64. message WatchpointHit {
  65. TensorProto tensor = 1;
  66. WatchCondition watch_condition = 2;
  67. int32 id = 3;
  68. }