Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 103 for SetAttr (0.13 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

      llvm::SmallVector<mlir::Type, 4> output_types(num_split, output_type);
      *split_op = builder->create<mlir::TF::SplitOp>(
          location, output_types, split_dimension_op.getOutput(), src_input);
      (*split_op)->setAttr(
          kNumSplitAttr,
          builder->getIntegerAttr(builder->getIntegerType(32), num_split));
      return mlir::success();
    }
    
    // Creates a tf::ConcatOp that merges `input` values in `concat_dimension`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

      Operation* parent_op = op->getParentOp();
      if (!parent_op) return false;
      return HasOutsideCompilationAncestor(parent_op);
    }
    
    Operation* ApplyXlaHostTransferAttr(Operation* op, OpBuilder& builder) {
      op->setAttr("_xla_has_host_transfer", builder.getBoolAttr(true));
      return op;
    }
    
    // Creates a tf._XlaSendFromHost or tf._XlaSendFromHostV2 op. If device ordinal
    // is present, a tf._XlaSendFromHostV2 op is created instead.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

      op->replaceAllUsesWith(flex_op);
      op->erase();
      return true;
    }
    
    // Sets the "no_fallback" attribute.
    Value SetNoFallbackAttr(PatternRewriter &rewriter, Value val) {
      val.getDefiningOp()->setAttr(kNoFallbackAttr, rewriter.getUnitAttr());
      return val;
    }
    
    // Returns true if the attr is a float attribute and be equal to value.
    static bool FloatValueEquals(const Attribute &attr, double value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/cluster_tf_ops_pass.cc

        for (int i : llvm::seq<int>(0, metadata.result_devices.size())) {
          func_op.setResultAttr(
              i, kTFDeviceAttr,
              StringAttr::get(context, metadata.result_devices[i]));
        }
    
        func_op->setAttr(kHostAttr, StringAttr::get(context, host));
        func_op.setPublic();
        Block *block = func_op.addEntryBlock();
    
        // Clones and moves the operations into the function's body. And the cloned
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

                                         ModuleOp& module) {
      const auto ex_attr_value = module->getAttrOfType<IntegerAttr>(attr_name);
      if (ex_attr_value == nullptr) {
        module->setAttr(attr_name, attr_value);
        return success();
      }
      if (ex_attr_value == attr_value) {
        return success();
      }
      return op->emitOpError() << "module already contains an attribute "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

      // LINT.ThenChange(../../../../core/common_runtime/inline_function_utils.cc)
    
      for (Block &block : inlinedBlocks) {
        block.walk([&](Operation *op) {
          if (op->getDialect() == call->getDialect())
            op->setAttr(device_id, node_device(op));
        });
      }
    }
    
    struct TFInlinerInterface : public DialectInlinerInterface {
      using DialectInlinerInterface::DialectInlinerInterface;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

      // Check that there are no duplicated exported_names.
      DenseMap<StringRef, Operation *> exported_name_to_op;
      for (auto &op : module) {
        auto attr = op.getAttr(exported_names_ident);
        if (!attr) continue;
        // If this verifier is called before we verify the
        // 'tf_saved_model.exported_names' attribute, then it might be invalid.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

    class ConvertEmbeddedLookupFunc {
     public:
      explicit ConvertEmbeddedLookupFunc(func::FuncOp func) : func_(func) {}
    
      void RewriteFunc() {
        func_->setAttr(kTFImplements,
                       StringAttr::get(func_.getContext(), "embedding_lookup"));
        Value lookup = func_.getArgument(1);
        Value value = func_.getArgument(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

        if (!preceding_qcast) return failure();
    
        auto new_qcast = rewriter.create<quantfork::QuantizeCastOp>(
            q_op.getLoc(), q_op.getType(), preceding_qcast.getArg());
        new_qcast->setAttr(kVolatileOpAttrName, rewriter.getUnitAttr());
        q_op->replaceAllUsesWith(new_qcast);
        return success();
      }
    };
    
    bool PrepareQuantizePass::ContainsQuantizeOps(func::FuncOp func) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

            // tensorflow/lite/kernels/fully_connected.cc. The kernels will handle
            // the asymmetric_quantize_inputs attribute in the builtin option.
            dynamic_range_quantized_user->setAttr(
                kAsymmetricQuantizeInputsAttr,
                BoolAttr::get(rewriter.getContext(), true));
            changed = true;
          }
        }
        return changed;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
Back to top