Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for BoolAttr (0.17 sec)

  1. tensorflow/compiler/jit/xla_kernel_creator_test.cc

      std::unique_ptr<ProcessFunctionLibraryRuntime> pflr_;
    
      std::unique_ptr<OpKernel> kernel_;
    };
    
    AttrValue BoolAttr(bool b) {
      AttrValue v;
      v.set_b(b);
      return v;
    }
    
    TEST_F(XlaKernelCreatorTest, OneFloatOneResourceArgument) {
      FunctionDef fdef = XTimesY();
      (*fdef.mutable_attr())["_XlaMustCompile"] = BoolAttr(true);
      Init({fdef});
      XlaKernelCreator xla_kernel_creator;
      auto callsite =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 16 01:39:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_lowering_patterns.td

                        (TFL_HardSwishOp $input)>;
    
    def IsNchwLayoutOp: Constraint<CPred<
      "$0.get(\"is_nchw_op\") && $0.get(\"is_nchw_op\").dyn_cast<BoolAttr>() "
          "== mlir::BoolAttr::get($_builder.getContext(), true)">>;
    
    def IsNhwcLayoutOp: Constraint<Neg<IsNchwLayoutOp.predicate>>;
    
    // TODO(b/343278954): Move the creation of transposes to a separate prepare pass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 18:45:51 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.td

    // Receives a composite DictionaryAttr as an argument and checks if has a
    // BoolAttr with the name `attr_name` and value `val`.
    class IsBoolCompositeAttribute <string attr_name, string val>:
      IsCompositeAttribute<attr_name, BoolAttr, val>;
    
    // Receives a composite DictionaryAttr as an argument and checks if has a
    // StrAttr with the name `attr_name` and value `val`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 19:05:30 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.h

    Type DeduceEqualCmpOpType(Builder *builder, Location loc, Value x, Value y,
                              BoolAttr incompatible_shape_error);
    
    Type InferReductionOpType(Value input, Value reduction_indices,
                              BoolAttr keep_dims);
    
    // Verifies that the given types are cast compatible. If not, emits appropriate
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

    // incompatible shapes. Otherwise, returns a tensor type with unknown rank.
    Type DeduceEqualCmpOpType(Builder *builder, Location loc, Value x, Value y,
                              BoolAttr incompatible_shape_error) {
      auto result_type =
          OpTrait::util::getBroadcastedType(x.getType(), y.getType());
      if (!result_type) {
        if (incompatible_shape_error.getValue()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/legalize_variables.cc

        // If TFLite variable legalization is not allowed, then we skip this pass.
        if (auto legalize_tfl_variables_attr =
                module->getAttr(kLegalizeTflVariables)) {
          if (!mlir::cast<BoolAttr>(legalize_tfl_variables_attr).getValue()) return;
        }
    
        RewritePatternSet patterns(&getContext());
        populateWithGenerated(patterns);
        (void)applyPatternsAndFoldGreedily(module, std::move(patterns));
      }
    };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc

    std::optional<bool> GetBoolFromCompositeAttr(
        const DictionaryAttr& composite_attrs, llvm::StringRef attr_name) {
      auto attr = composite_attrs.get(attr_name);
      if (!attr) return std::nullopt;
      if (auto bool_attr = mlir::dyn_cast_or_null<BoolAttr>(attr)) {
        return bool_attr.getValue();
      }
      return std::nullopt;
    }
    
    ShapedType GetNhwcReturnTypeFromNchw(Operation* old_op) {
      auto composite_result_shape =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/canonicalize_compile_and_replicate_attributes.cc

        }
    
        // Convert `_XlaMustCompile`.
        if (op->hasAttr(tensorflow::kMustCompileAttr)) {
          bool must_compile_attr_val =
              op->getAttrOfType<BoolAttr>(tensorflow::kMustCompileAttr).getValue();
          op->removeAttr(tensorflow::kMustCompileAttr);
          if (!must_compile_attr_val) {
            if (op->hasAttr(tensorflow::kCompileDeviceTypeAttr)) {
              op->emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/tf_quant_ops.td

    }
    
    def TF_DumpTensorOp : TF_Op<"DumpTensor", []> {
      let summary = "Dump tensor proto.";
    
      let arguments = (ins
        Arg<TF_Tensor>:$input,
    
        StrAttr:$log_dir_path,
        StrAttr:$file_name,
        BoolAttr:$enabled,
        StrAttr:$func_name,
        StrAttr:$node_name
      );
    
      TF_DerivedOperandTypeAttr T = TF_DerivedOperandTypeAttr<0>;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/mark_initialized_variables.cc

          is_variable_initialized =
              IsVariableInitialized(var_op, handle.device(), mgr, session);
        }
        var_op->setAttr("_is_initialized",
                        BoolAttr::get(context, is_variable_initialized));
      }
      return success();
    }
    
    LogicalResult MarkInitializedVariablesInFunction(ModuleOp module,
                                                     tensorflow::Session* session) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 13 19:14:56 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top