Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for ParseFullName (0.18 sec)

  1. tensorflow/compiler/jit/device_util.cc

        const absl::string_view name1 = device_info_cache.GetNameFor(d1->value());
    
        DeviceNameUtils::ParsedName parsed0, parsed1;
        if (!DeviceNameUtils::ParseFullName(name0, &parsed0) ||
            !DeviceNameUtils::ParseFullName(name1, &parsed1) ||
            !DeviceNameUtils::AreCompatibleDevNames(parsed0, parsed1)) {
          return true;
        }
    
        if (DeviceNameUtils::IsSpecification(parsed0, parsed1)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

        if (!string_attr)
          return op->emitOpError(llvm::formatv(
              "bad '{0}' attribute at index {1}, not a string", kDevicesAttr, idx));
    
        if (DeviceNameUtils::ParseFullName(string_attr.getValue().str(), &device)) {
          devices->AddDevice(device);
        } else {
          return op->emitOpError(
              llvm::formatv("bad '{0}' attribute, '{1}', not a valid device",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc

      DeviceNameUtils::ParsedName parsed_name;
      DeviceNameUtils::ParseFullName(gpu0, &parsed_name);
      auto meta_0 = devices.GetGpuDeviceMetadata(parsed_name);
      ASSERT_TRUE(meta_0.has_value());
      ASSERT_EQ(meta_0->getCcMajor(), 1);
      ASSERT_EQ(meta_0->getCcMinor(), 2);
    
      DeviceNameUtils::ParseFullName(gpu1, &parsed_name);
      auto meta_1 = devices.GetGpuDeviceMetadata(parsed_name);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.cc

      if (!device || device.getValue().empty()) {
        return std::nullopt;
      }
      tensorflow::DeviceNameUtils::ParsedName parsed_name;
      if (!tensorflow::DeviceNameUtils::ParseFullName(device.str(), &parsed_name)) {
        return std::nullopt;
      }
      if (!parsed_name.has_type) {
        return std::nullopt;
      }
      return parsed_name.type;
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/passes/hoist_broadcast_read.cc

                                                          kFuncDeviceAttr)) {
          std::string device = attr.getValue().str();
          tensorflow::DeviceNameUtils::ParsedName parsed_name;
          if (!tensorflow::DeviceNameUtils::ParseFullName(device, &parsed_name)) {
            return read->emitOpError() << "invalid device '" << device << "'";
          }
          is_cpu_read = parsed_name.type == kCpuDeviceType;
          return success();
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

      auto caller_device = call->getAttrOfType<StringAttr>(device_id);
      if (!caller_device) return;
    
      DeviceNameUtils::ParsedName caller_parsed_device;
      if (!DeviceNameUtils::ParseFullName(caller_device.getValue().str(),
                                          &caller_parsed_device))
        return;
    
      MLIRContext *context = call->getContext();
      auto node_device = [&](Operation *n) -> StringAttr {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/mlir_bridge_pass_util.cc

      for (const Node* node : graph.nodes()) {
        if (node->type_string() == nodeType) {
          auto device_name = node->assigned_device_name();
          DeviceNameUtils::ParsedName device;
          if (DeviceNameUtils::ParseFullName(device_name, &device) &&
              device.has_job && device.job == jobType) {
            for (const auto& attr : node->attrs()) {
              auto attr_key = attr.first;
              auto attr_value = attr.second;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 12:22:33 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

          device = alias.getDefiningOp()->getAttrOfType<StringAttr>(kDeviceAttr);
        }
    
        if (!device) return false;
        tensorflow::DeviceNameUtils::ParsedName parsed_device;
        if (!tensorflow::DeviceNameUtils::ParseFullName(device.getValue().str(),
                                                        &parsed_device)) {
          return false;
        }
        return parsed_device.has_type && parsed_device.type == kDeviceCPU;
      });
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  9. tensorflow/c/eager/dlpack.cc

      DLDevice ctx;
      const char* device_name =
          tensorflow::unwrap(h)->BackingDeviceName(&status->status);
      DeviceNameUtils::ParsedName parsed_name;
      tensorflow::DeviceNameUtils::ParseFullName(device_name, &parsed_name);
      std::string device_type = parsed_name.type;
      int device_id = 0;
      if (parsed_name.has_id) {
        device_id = parsed_name.id;
      }
    
      ctx.device_id = device_id;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 15 09:49:45 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/encapsulate_xla_computations_pass.cc

        if (!TryGetNodeAttr(n->attrs(), kXlaClusterIdAttr, &name)) continue;
        // Early return for any node with a device that is not a CPU or GPU.
        DeviceNameUtils::ParsedName parsed;
        if (DeviceNameUtils::ParseFullName(n->requested_device(), &parsed)) {
          if (parsed.type != DEVICE_CPU && parsed.type != DEVICE_GPU) {
            return false;
          }
        }
      }
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 15.1K bytes
    - Viewed (0)
Back to top