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.

__init__.py 2.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2020 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ============================================================================
  15. """
  16. Operators can be used in the construct function of Cell.
  17. Examples:
  18. >>> from mindspore.ops import operations as P
  19. >>> from mindspore.ops import composite as C
  20. >>> from mindspore.ops import functional as F
  21. Note:
  22. - The Primitive operators in operations need to be used after instantiation.
  23. - The composite operators are the pre-defined combination of operators.
  24. - The functional operators are the pre-instantiated Primitive operators, which can be used directly as a function.
  25. - For functional operators usage, please refer to
  26. https://gitee.com/mindspore/mindspore/blob/master/mindspore/ops/functional.py
  27. """
  28. from .primitive import Primitive, PrimitiveWithInfer, prim_attr_register
  29. from .vm_impl_registry import get_vm_impl_fn, vm_impl_registry
  30. from .op_info_register import op_info_register, AkgGpuRegOp, AkgAscendRegOp, AiCPURegOp, TBERegOp, DataType
  31. from .primitive import constexpr
  32. from .._c_expression import signature_rw, signature_kind
  33. __primitive__ = [
  34. "prim_attr_register", "Primitive", "PrimitiveWithInfer",
  35. "signature_rw", "signature_kind"
  36. ]
  37. __all__ = ["get_vm_impl_fn", "vm_impl_registry",
  38. "op_info_register", "AkgGpuRegOp", "AkgAscendRegOp", "AiCPURegOp", "TBERegOp", "DataType",
  39. "constexpr"]
  40. __all__.extend(__primitive__)