Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for StaticDeviceMgr (0.28 sec)

  1. tensorflow/c/experimental/saved_model/core/saved_variable_loading_test.cc

            options, "/job:localhost/replica:0/task:0", &devices));
        device_mgr_ = absl::make_unique<StaticDeviceMgr>(std::move(devices));
        ctx_ = testing::CreateTestingEagerContext(device_mgr_.get());
      }
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 09:34:33 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/saved_model/core/test_utils.cc

    #include "tensorflow/core/platform/test.h"
    #include "tensorflow/core/platform/types.h"
    
    namespace tensorflow {
    namespace testing {
    
    std::unique_ptr<StaticDeviceMgr> CreateTestingDeviceMgr() {
      return std::make_unique<StaticDeviceMgr>(
          DeviceFactory::NewDevice("CPU", {}, "/job:localhost/replica:0/task:0"));
    }
    
    EagerContextPtr CreateTestingEagerContext(DeviceMgr* device_mgr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Sep 08 20:13:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/ops/variable_ops_test.cc

          : device_mgr_(testing::CreateTestingDeviceMgr()),
            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // Sanity check for variable creation
    TEST_F(VariableOpsTest, CreateVariableSuccessful) {
      // Create a DT_Resource TensorHandle that points to a scalar DT_FLOAT tensor
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Aug 21 19:26:54 UTC 2020
    - 3.8K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc

          : device_mgr_(testing::CreateTestingDeviceMgr()),
            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // One way of obtaining the checkpointa checkpoint's tensor names is:
    // bazel run //tensorflow/python/tools:inspect_checkpoint -- --all_tensors
    // --file_name="$CKPT_PREFIX".
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/test_util.cc

      }
    
      std::vector<std::unique_ptr<Device>> devices;
      TF_CHECK_OK(DeviceFactory::AddDevices(
          options, "/job:localhost/replica:0/task:0", &devices));
      device_mgr_ = std::make_unique<StaticDeviceMgr>(std::move(devices));
    
      OptimizerOptions opts;
      lib_def_ = std::make_unique<FunctionLibraryDefinition>(OpRegistry::Global(),
                                                             FunctionDefLibrary());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/saved_model/core/constant_loading_test.cc

          : device_mgr_(testing::CreateTestingDeviceMgr()),
            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    // Basic sanity check that roundtripping a Tensor->Tensorproto->Constant
    // preserves values.
    TEST_P(ConstantTest, CreateConstantSuccessful) {
      // Get test parameters
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/saved_model/core/test_utils.h

    #include "tensorflow/core/framework/types.pb.h"
    #include "tensorflow/core/platform/types.h"
    
    namespace tensorflow {
    namespace testing {
    
    // Creates a DeviceMgr suitable for local tests.
    std::unique_ptr<StaticDeviceMgr> CreateTestingDeviceMgr();
    
    // Creates an EagerContext suitable for local tests. Does not take ownership
    // of `device_mgr`.
    EagerContextPtr CreateTestingEagerContext(DeviceMgr* device_mgr);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_kernel_creator_test.cc

          *(proto.add_function()) = fdef;
        }
        lib_def_ = std::make_unique<FunctionLibraryDefinition>(
            OpRegistry::Global(), proto);
        OptimizerOptions opts;
        device_mgr_ = std::make_unique<StaticDeviceMgr>(std::move(devices));
        pflr_ = std::make_unique<ProcessFunctionLibraryRuntime>(
            device_mgr_.get(), Env::Default(), /*config=*/nullptr,
            TF_GRAPH_DEF_VERSION, lib_def_.get(), opts,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 16 01:39:55 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.h

      std::string device_type_;
    
      mlir::PatternRewriter& rewriter_;
      tensorflow::OpOrArgLocNameMapper name_mapper_;
    
      tensorflow::XlaContext* context_;  // Ref-counted.
    
      std::unique_ptr<tensorflow::StaticDeviceMgr> device_mgr_;
      tensorflow::Device* device_;  // Owned by device_mgr_;
      std::unique_ptr<tensorflow::ScopedStepContainer> step_container_;
      std::unique_ptr<tensorflow::FunctionLibraryDefinition> flib_def_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/saved_model/core/tf_concrete_function_loading_test.cc

          : device_mgr_(testing::CreateTestingDeviceMgr()),
            ctx_(testing::CreateTestingEagerContext(device_mgr_.get())) {}
    
      EagerContext* context() { return ctx_.get(); }
    
     private:
      std::unique_ptr<StaticDeviceMgr> device_mgr_;
      EagerContextPtr ctx_;
    };
    
    class DummyCapture : public TensorHandleConvertible {
     public:
      DummyCapture(ImmediateExecutionContext* ctx, int8_t value)
          : TensorHandleConvertible(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top