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 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. // define the backend is 'GPU' or "Ascend"
  30. string backend = 3;
  31. // the full name of current node
  32. string cur_node = 4;
  33. }
  34. message EventReply {
  35. enum Status {
  36. OK = 0;
  37. FAILED = 1;
  38. PENDING = 2;
  39. }
  40. Status status = 1;
  41. oneof cmd {
  42. bool exit = 2;
  43. RunCMD run_cmd = 3;
  44. SetCMD set_cmd = 4;
  45. ViewCMD view_cmd = 5;
  46. }
  47. }
  48. message RunCMD {
  49. // step level or node level. "step" or "node"
  50. string run_level = 1;
  51. oneof cmd {
  52. int32 run_steps = 2;
  53. // the next node full name
  54. string node_name = 3;
  55. }
  56. }
  57. message SetCMD {
  58. repeated WatchNode watch_nodes = 1;
  59. WatchCondition watch_condition = 2;
  60. bool delete = 3;
  61. int32 id = 4;
  62. }
  63. message ViewCMD {
  64. repeated TensorProto tensors = 1;
  65. }
  66. message WatchCondition {
  67. enum Condition {
  68. nan = 0;
  69. inf = 1;
  70. }
  71. Condition condition = 1;
  72. }
  73. message WatchNode {
  74. string node_name = 1;
  75. string node_type = 2;
  76. }
  77. message WatchpointHit {
  78. TensorProto tensor = 1;
  79. WatchCondition watch_condition = 2;
  80. int32 id = 3;
  81. }