Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 114 for var_handle_op (0.19 sec)

  1. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

                                   result);
    }
    
    Node* MakeWrite(const Scope& scope, Output value_to_write, const string& id) {
      Output var_handle = ops::VarHandleOp(scope.WithOpName("Var_" + id), DT_FLOAT,
                                           TensorShape({}));
      ops::AssignVariableOp assign_op(scope.WithOpName("Assignee_" + id),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/optimize_tf_control_flow_side_effect.mlir

    }
    
    // CHECK-LABEL: func @no_set_stateless
    func.func @no_set_stateless(%arg: tensor<i32>, %cond: tensor<i1>) -> (tensor<i32>, tensor<i32>) {
      %handle = "tf.VarHandleOp"() { container = "", shared_name = "var" } : () -> tensor<!tf_type.resource<tensor<i32>>>
      "tf.AssignVariableOp"(%handle, %arg) : (tensor<!tf_type.resource<tensor<i32>>>, tensor<i32>) -> ()
      // CHECK: tf.While
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 01:15:55 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_duplicate_resource_ops.cc

      auto& island_block = island_op.getBody().front();
      if (++island_block.begin() != --island_block.end()) return nullptr;
    
      Operation* resource_op = &island_block.front();
      if (llvm::isa<TF::VarHandleOp, TF::HashTableOp, TF::HashTableV2Op,
                    TF::MutableHashTableV2Op>(resource_op)) {
        return resource_op;
      }
      return nullptr;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 26 04:26:16 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. tensorflow/cc/experimental/libtf/tests/variable_test.cc

      {
        AbstractTensorHandle* var_ptr = nullptr;
        PartialTensorShape scalar_shape;
        TF_EXPECT_OK(
            PartialTensorShape::MakePartialShape<int32_t>({}, 0, &scalar_shape));
        TF_EXPECT_OK(tensorflow::ops::VarHandleOp(ctx_.get(), &var_ptr, DT_FLOAT,
                                                  scalar_shape));
        var.reset(var_ptr);
      }
      // Assign a value.
      auto x = CreateScalarTensor<float, TF_FLOAT>(2.0f);
      TF_EXPECT_OK(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 21:44:52 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc

                                              symbol_table);
          ResourceConstructingOps result(global_tensor);
          return result;
        }
      } else if (auto vh = dyn_cast<TF::VarHandleOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(vh);
      } else if (auto it = dyn_cast<TF::IteratorOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(it);
      }
      return ResourceConstructingOps();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.h

    // SavedModelBundle complements the imported ModuleOp by providing access to
    // `tensorflow::Session` which may be useful when reading values from resources
    // (e.g. `TF::VarHandleOp`s).
    using ImportedMlirModuleOp =
        std::pair<OwningOpRef<ModuleOp>,
                  std::unique_ptr<::tensorflow::SavedModelBundle>>;
    
    // Loads a SavedModel at `saved_model_path` and converts it to `mlir::ModuleOp`.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfrt/tests/mlrt/tf_to_mlrt.mlir

    // Test lowering of IfrtLoadVariableOp
    
    // CHECK-LABEL: func @ifrt_load_variable_test
    func.func @ifrt_load_variable_test() -> () {
      // CHECK: [[HANDLE:%.*]] = tf_mlrt.executeop()
      // CHECK-SAME:  VarHandleOp
      %0 = "tf.VarHandleOp"() {__op_key = 1: i32, device = "/device:CPU:0", container = "", shared_name = "variable"} : () -> tensor<!tf_type.resource<tensor<1x3xf32>>>
      // CHECK-NEXT: "tf_mlrt.ifrt_load_variable"([[HANDLE]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 31 20:44:15 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

    // Returns true if 'op' is TF op that accepts resource type, but is
    // supported by TFLite.
    bool IsSupportedTFLiteResourceOp(Operation* op) {
      return llvm::isa<TF::ReadVariableOp, TF::AssignVariableOp, TF::VarHandleOp,
                       TF::LookupTableFindV2Op, TF::LookupTableImportV2Op,
                       TF::LookupTableSizeV2Op>(op);
    }
    
    // Returns true if 'op' is TF/TFLite control flow op that can accept resource
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/tpu_cluster_formation.mlir

    func.func @resource_before_cluster() {
      // CHECK-NEXT: [[CONST:%.*]] = "tf.Const"
      %0 = "tf.Const"() {value = dense<1.000000e+00> : tensor<f32>} : () -> tensor<f32>
    
      // CHECK-NEXT: [[UNUSED_RESOURCE:%.*]] = "tf.VarHandleOp"
      // CHECK-NEXT: "tf.AssignAddVariableOp"([[UNUSED_RESOURCE]], [[CONST]])
    
      // CHECK:      "tf_device.cluster"
      // CHECK-NEXT:   "tf.NoOp"
      // CHECK-NEXT:   tf_device.return
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 22:03:30 UTC 2024
    - 53.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/tests/mlrt/parallelization.mlir

    // CHECK-LABEL: func private @main_stream_{{[0-9]*}}
    // CHECK-SAME: ([[CONTROL_FUTURE:%.*]]: !mlrt.future, [[PROMISE:%.*]]: !mlrt.promise, [[PROMISE_HANDLE:%.*]]: !mlrt.promise)
    // CHECK: [[HANDLE:%.*]] = "tf.VarHandleOp"
    // CHECK-NEXT: "tf_mlrt.tf_promise"([[PROMISE_HANDLE]], [[HANDLE]])
    // CHECK: mlrt.await_control [[CONTROL_FUTURE]]
    // CHECK-NEXT: [[V:%.*]] = "tf.ReadVariableOp"([[HANDLE]])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 22:07:30 UTC 2023
    - 15K bytes
    - Viewed (0)
Back to top