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.

node_def.proto 3.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Copyright 2021 Tianshu AI Platform. All Rights Reserved.
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. ============================================================= */
  12. syntax = "proto3";
  13. package oneflow;
  14. import "oneflow/customized/utils/attr_value.proto";
  15. message NodeDef {
  16. // The name given to this operator. Used for naming inputs,
  17. // logging, visualization, etc. Unique within a single GraphDef.
  18. // Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*".
  19. string name = 1;
  20. // The operation name. There may be custom parameters in attrs.
  21. // Op names starting with an underscore are reserved for internal use.
  22. string op = 2;
  23. // Each input is "node:src_output" with "node" being a string name and
  24. // "src_output" indicating which output tensor to use from "node". If
  25. // "src_output" is 0 the ":0" suffix can be omitted. Regular inputs
  26. // may optionally be followed by control inputs that have the format
  27. // "^node".
  28. repeated string input = 3;
  29. // A (possibly partial) specification for the device on which this
  30. // node should be placed.
  31. // The expected syntax for this string is as follows:
  32. //
  33. // DEVICE_SPEC ::= PARTIAL_SPEC
  34. //
  35. // PARTIAL_SPEC ::= ("/" CONSTRAINT) *
  36. // CONSTRAINT ::= ("job:" JOB_NAME)
  37. // | ("replica:" [1-9][0-9]*)
  38. // | ("task:" [1-9][0-9]*)
  39. // | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") )
  40. //
  41. // Valid values for this string include:
  42. // * "/job:worker/replica:0/task:1/gpu:3" (full specification)
  43. // * "/job:worker/gpu:3" (partial specification)
  44. // * "" (no specification)
  45. //
  46. // If the constraints do not resolve to a single device (or if this
  47. // field is empty or not present), the runtime will attempt to
  48. // choose a device automatically.
  49. string device = 4;
  50. // Operation-specific graph-construction-time configuration.
  51. // Note that this should include all attrs defined in the
  52. // corresponding OpDef, including those with a value matching
  53. // the default -- this allows the default to change and makes
  54. // NodeDefs easier to interpret on their own. However, if
  55. // an attr with a default is not specified in this list, the
  56. // default will be used.
  57. // The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and
  58. // one of the names from the corresponding OpDef's attr field).
  59. // The values must have a type matching the corresponding OpDef
  60. // attr's type field.
  61. // TODO(josh11b): Add some examples here showing best practices.
  62. map<string, AttrValue> attr = 5;
  63. };

一站式算法开发平台、高性能分布式深度学习框架、先进算法模型库、视觉模型炼知平台、数据可视化分析平台等一系列平台及工具,在模型高效分布式训练、数据处理和可视分析、模型炼知和轻量化等技术上形成独特优势,目前已在产学研等各领域近千家单位及个人提供AI应用赋能