Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for _tfr_op_name (0.14 sec)

  1. tensorflow/compiler/mlir/tfr/python/composite.py

      def __call__(self, compose_fn):
        # TODO(fengliuai): more sanity check of the input function and make sure
        # the bounded arguments of the function matches the 'inputs' and 'attrs'.
        setattr(compose_fn, '_tfr_op_name', self._op_name)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/python/tfr_gen.py

        if isinstance(func_def, types.FunctionType):
          if not hasattr(func_def, '_tfr_op_name'):
            # skip a non-composition function
            if optional:
              return (None, None)
            else:
              raise KeyError('OpDef does not exist: ' + f_name)
          op_name = getattr(func_def, '_tfr_op_name')
        elif not func_def:
          op_name = f_name
        else:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 27 15:27:03 UTC 2022
    - 55.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/utils/utils.cc

          compose_func_name.push_back('_');
          compose_func_name.push_back(tf_op_name[i] + 'a' - 'A');
        } else {
          compose_func_name.push_back(tf_op_name[i]);
        }
      }
      return compose_func_name;
    }
    
    std::string GetTFOpName(StringRef compose_func_name) {
      std::string tf_op_name;
      bool after_underscore = false;
      for (int i = 0; i < compose_func_name.size(); ++i) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

        if (!op.getCustomCode().starts_with(kFlexOpNamePrefix)) {
          return failure();
        }
    
        llvm::StringRef tf_op_name =
            op.getCustomCode().substr(kFlexOpNamePrefix.size());
        const std::string tf_op_full_name = llvm::Twine("tf.", tf_op_name).str();
    
        // Create the TF op
        OperationState op_state(op.getLoc(), tf_op_full_name);
        op_state.addOperands(op.getOperands());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfr/utils/utils.h

    // TFR function name. Examples:
    //   tf.Pack => tf__pack
    //   tf.ConcatV2 => tf__concat_v2
    // TODO(fengliuai): move to an util file.
    std::string GetComposeFuncName(StringRef tf_op_name);
    
    // This is a hardcoded rule for mapping a TFR function op name to the
    // corresponding TF opname. Examples:
    //   tf__pack -> tf.Pack
    //   tf__concat_v2 => tf.ConcatV2
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        StringRef op_name = op->getName().stripDialect();
        if (!func_symbols_.contains(op_name)) {
          std::string tf_op_name = llvm::formatv(
              "{0}.{1}", TF::TensorFlowDialect::getDialectNamespace(), op_name);
          OperationState state =
              OperationState(loc, tf_op_name, inner_op_operands, new_types, attrs,
                             op->getSuccessors(), new_regions);
          inner_op = rewriter.create(state);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        const llvm::StringMap<Attribute>& derived_attrs) const {
      // Create the new op
      Location loc = call_op.getLoc();
      rewriter.setInsertionPointAfter(call_op);
      std::string tf_op_name = GetTFOpName(call_op.getCallee());
      OperationState new_state(loc, tf_op_name, inputs, output_types, attr_list);
      Operation* new_op = rewriter.create(new_state);
      if (materialize_derived_attrs_) {
        for (const auto& attr : derived_attrs) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
Back to top