Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 93 for created (0.11 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

        // Create tensor attribute for this variable.
        absl::StatusOr<ElementsAttr> tensor_attr_or =
            ConvertTensor(tensor, &builder);
        if (!tensor_attr_or.ok()) {
          return module.emitOpError()
                 << "failed to convert tensor (name: " << name.str() << ")";
        }
        ElementsAttr tensor_attr = tensor_attr_or.value();
    
        builder.create<tf_saved_model::GlobalTensorOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        // Finally, use the quantization parameter to create the quantize and
        // dequantize ops, and insert them between the tf.FakeQuantWithMinMaxVarsOp
        // and its users.
        Value value = tf_op.getOutputs();
        auto quantize = rewriter.create<quantfork::QuantizeCastOp>(
            tf_op.getLoc(), qtype.getValue(), value);
        auto dequantize = rewriter.create<quantfork::DequantizeCastOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tf_functional_to_executor.cc

      auto graph_op = builder.create<tf_executor::GraphOp>(
          loc, func.getFunctionType().getResults());
      graph_op.getBody().push_back(new Block);
      builder.setInsertionPointToEnd(&graph_op.GetBody());
      auto island = builder.create<tf_executor::IslandOp>(
          loc, func.getFunctionType().getResults(),
          tf_executor::ControlType::get(&getContext()), ArrayRef<Value>());
      // Create Fetch.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 11 20:52:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc

      // Create SessionInitializerOp; should reference main function.
      StringAttr func_name = main_func.getSymNameAttr();
      llvm::SmallVector<mlir::Attribute, 2> func_names = {
          mlir::SymbolRefAttr::get(builder.getContext(), func_name)};
      builder.create<tf_saved_model::SessionInitializerOp>(
          module->getLoc(), builder.getArrayAttr(func_names));
      // Create AssetOp; this holds the checkpoint_path.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/utils/stablehlo_type_utils_test.cc

      const OwningOpRef<mlir::stablehlo::ConstantOp> constant_op =
          builder_.create<mlir::stablehlo::ConstantOp>(
              builder_.getUnknownLoc(), builder_.getI32IntegerAttr(0));
      EXPECT_TRUE(IsStablehloOp(*constant_op));
    }
    
    TEST_F(StablehloTypeUtilsTest, IsStablehloOpFailsWithArithOp) {
      const OwningOpRef<mlir::arith::ConstantOp> constant_op =
          builder_.create<mlir::arith::ConstantOp>(builder_.getUnknownLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 25 00:32:20 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/internal/utils/dialect_detection_utils_test.cc

      context.loadDialect<TensorFlowDialect>();
      OpBuilder opBuilder(&context);
      OperationState state(UnknownLoc::get(opBuilder.getContext()),
                           /*OperationName=*/"tf.Const");
      mlir::Operation* op = Operation::create(state);
    
      bool result = IsInBridgeAcceptableDialects(op);
    
      EXPECT_TRUE(result);
      op->destroy();
    }
    
    TEST_F(SharedUtilsTest, IsInFunctionalDialectFails) {
      MLIRContext context;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 08 20:33:37 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/cc/io.cc

    namespace stablehlo::quantization::io {
    
    absl::StatusOr<std::string> GetLocalTmpFileName(tsl::Env* const env) {
      std::string tmp_fname{};
      if (!env->LocalTempFilename(&tmp_fname)) {
        return absl::InternalError("Failed to create tmp file name.");
      }
    
      return tmp_fname;
    }
    
    absl::StatusOr<std::string> GetLocalTmpFileName() {
      return GetLocalTmpFileName(tsl::Env::Default());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 03:28:15 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/cc/io_test.cc

    // A test-only derived class of `tsl::Env` which is broken. Used to cause
    // failure for the `CreateTmpDir` function. Each of the overridden member
    // functions implements a dummy functionality just to be able to create an
    // instance of this class.
    class TestEnvBrokenFileSystem : public tsl::Env {
     public:
      TestEnvBrokenFileSystem() = default;
    
      bool MatchPath(const tsl::string& path, const tsl::string& pattern) override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 03:28:15 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

      FunctionType function_type =
          builder.getFunctionType(input_types, return_types);
    
      std::string function_name = absl::StrCat("func_", subgraph.subgraph_id_);
    
      func::FuncOp new_func = func::FuncOp::create(builder.getUnknownLoc(),
                                                   function_name, function_type);
      new_func.setVisibility(func::FuncOp::Visibility::Private);
      new_func.addEntryBlock();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

      }
    
      if constexpr (is_input) {
        auto pi = builder.create<TF::TPUPartitionedInputV2Op>(
            op.getLoc(), op.getType(), op.getOperands(),
            builder.getI64ArrayAttr(partition_dims), builder.getBoolAttr(false),
            op.get_XlaShardingAttr());
        op->replaceAllUsesWith(pi);
      } else {
        auto po = builder.create<TF::TPUPartitionedOutputV2Op>(
            op.getLoc(), op.getResultTypes(), op.getOperand(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top