Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for SetDevice (0.12 sec)

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

        if (otherDevice->device_) {
          return SetDevice(otherDevice->device_);
        }
        return ChangeResult::NoChange;
      }
    
      void print(raw_ostream &os) const override {
        if (device_) {
          os << "<" << device_ << ">";
        } else {
          os << "<no device>";
        }
      }
    
      ChangeResult SetDevice(mlir::StringAttr device) {
        bool changed = (device != device_);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 00:30:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/device_context_test.cc

      tensorflow::GetXlaDeviceFlags()->tf_xla_enable_xla_devices = true;
      return true;
    }();
    
    class DeviceContextTest : public ::testing::Test {
     public:
      void SetDevice(const string& device_type) {
        auto& rollout_config = GetXlaOpsCommonFlags()->tf_xla_use_device_api;
        rollout_config.AllowForDeviceInXlaLaunch(DeviceType(device_type));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_host_send_recv_device_context_test.cc

    #include "tensorflow/core/framework/tensor_testutil.h"
    #include "tsl/lib/core/status_test_util.h"
    
    namespace tensorflow {
    namespace {
    
    class XlaHostSendRecvDeviceContextTest : public ::testing::Test {
     public:
      void SetDevice(const string& device_type) {
        auto device_factory = DeviceFactory::GetFactory(device_type);
        SessionOptions options;
        std::vector<std::unique_ptr<Device>> devices;
        Status s = device_factory->CreateDevices(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/xla_launch_util_gpu_test.cc

        auto device =
            DeviceFactory::NewDevice(device_type.type_string(), SessionOptions(),
                                     "/job:localhost/replica:0/task:0");
        device_ = device.get();
        SetDevice(device_type, std::move(device));
    
        XlaShapeLayoutHelpers::ShapeDeterminationFns shape_fns{
            UseNoPreferenceLayoutFn(), IdentityShapeRepresentationFn()};
        device_context_ = core::RefCountPtr<DeviceContext>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 10K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/xla_launch_util_test.cc

        auto device =
            DeviceFactory::NewDevice(device_type.type_string(), SessionOptions(),
                                     "/job:localhost/replica:0/task:0");
        device_ = device.get();
        SetDevice(device_type, std::move(device));
    
        // Create PjRtClient for XLA_CPU.
        TF_CHECK_OK(SetPjRtClientInTFGlobalResourceManager(
            device_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  6. tensorflow/c/kernels_test.cc

        TF_DeleteStatus(status);
    
    #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
        std::unique_ptr<Device> device(
            DeviceFactory::NewDevice(device_name_, {}, "/job:a/replica:0/task:0"));
        OpsTestBase::SetDevice(DEVICE_GPU, std::move(device));
    #endif
        TF_ASSERT_OK(NodeDefBuilder(op_name, op_name).Finalize(node_def()));
        TF_ASSERT_OK(InitOp());
      }
    
    #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 50.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/xla_platform_info_test.cc

    };
    
    #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
    TEST_F(XlaPlatformInfoTest, BuildXlaDeviceCompilerXlaDeviceMetadata) {
      device_setup_.AddDevicesAndSetUp({DEVICE_XLA_GPU});
    
      Device* device = device_setup_.GetDevice(DEVICE_XLA_GPU);
      const XlaDevice::Metadata* metadata = nullptr;
      TF_CHECK_OK(XlaDevice::GetMetadataFromDevice(device, &metadata));
      XlaPlatformInfo platform_info = XlaPlatformInfoFromDevice(device);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Jan 14 15:17:12 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_compiler_options_util_test.cc

      }
    
      DeviceSetup device_setup_;
    };
    
    TEST_F(XlaCompilerOptionsTest, PjRtOptionsXlaDevice) {
      device_setup_.AddDevicesAndSetUp({DEVICE_XLA_GPU});
      Device* device = device_setup_.GetDevice(DEVICE_XLA_GPU);
      DeviceType compilation_device_type = DeviceType(DEVICE_GPU_XLA_JIT);
    
      se::Platform::Id platform_id = nullptr;
      auto xla_device_metadata = CreateXlaDeviceMetadata(compilation_device_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Dec 29 01:41:20 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/pjrt_compile_util_test.cc

    TEST(PjrtCompileUtilTest, CompileToPjRtLoadedExecutable) {
      DeviceSetup device_setup;
      TF_ASSERT_OK_AND_ASSIGN(auto fdef, SampleFuntionAddXY("foo"));
      device_setup.AddDevicesAndSetUp({DEVICE_GPU}, fdef);
    
      Device* device = device_setup.GetDevice(DEVICE_GPU);
      const XlaPlatformInfo platform_info = XlaPlatformInfoFromDevice(device);
    
      NameAttrList function;
      function.set_name("foo");
    
      ResourceMgr resource_mgr("");
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 21 23:21:57 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

            return WalkResult::advance();
          } else if (device_str_attr.getValue() != launch.getDevice()) {
            return launch.emitOpError()
                   << "inner op has conflicting 'device' attribute, "
                      "got '"
                   << device_str_attr.getValue() << "' but expected '"
                   << launch.getDevice() << "'";
          }
        } else {
          return launch.emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top