Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for device_str (0.3 sec)

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

        op->emitError() << "TPUCopyWithDynamicShapeOp is not in a launch";
      }
      std::string device_str = launch_op.getDeviceAttr().getValue().str();
      std::string cpu0_device;
      if (failed(tensorflow::GetNonReplicatedCPU0(op, &cpu0_device)))
        return failure();
      if (device_str != tensorflow::GetDeviceAliasForHostOfLogicalCore(0) &&
          device_str != cpu0_device) {
        op->emitError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      auto device_attr = op->getAttrOfType<StringAttr>("device");
      if (!device_attr || device_attr.getValue().empty()) return device_ordinal_str;
    
      // TODO(b/229028654) Remove string conversion once implicit conversion between
      // llvm::StringRef and absl::string_view works.
      absl::string_view device_str(device_attr.data(), device_attr.size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/stream_executor/stream_executor_test.cc

                           SP_DeviceMemoryBase* const device_dst,
                           const SP_DeviceMemoryBase* const device_src,
                           uint64_t size, TF_Status* const status) {
        TF_SetStatus(status, TF_OK, "");
        std::memcpy(device_dst->opaque, device_src->opaque, size);
      };
    
      StreamExecutor* executor = GetExecutor(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 19:54:04 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/mlir_graph_optimization_pass_test.cc

                          ::testing::EquivToProto(original_graph_def)));
    #endif
      }
    
      void InitGraphOptions() {
        session_options_.config = config_proto_;
        graph_optimization_pass_options_.device_set = &device_set_;
        graph_optimization_pass_options_.session_options = &session_options_;
        graph_optimization_pass_options_.graph = &graph_;
        graph_optimization_pass_options_.flib_def = flib_.get();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 08:25:30 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

          // If op already has a TPU device set, simply propagate its device.
          auto device_attr = op_to_update->getAttrOfType<StringAttr>(kDeviceAttr);
          const bool has_device = device_attr && !device_attr.getValue().empty();
          if (has_device && tensorflow::IsTPUDevice(device_attr.getValue())) {
            PopulateDeviceForOpResults(*op_to_update, device_attr.getValue(),
                                       value_to_device);
            continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/device_util_test.cc

                            string* result) {
      jit::DeviceInfoCache cache;
      jit::DeviceSet device_set;
      for (absl::string_view name : device_names) {
        TF_ASSIGN_OR_RETURN(jit::DeviceId device_id, cache.GetIdFor(name));
        device_set.Insert(device_id);
      }
    
      TF_ASSIGN_OR_RETURN(
          jit::DeviceId result_id,
          PickDeviceForXla(cache, device_set, allow_mixing_unknown_and_cpu));
      *result = string(cache.GetNameFor(result_id));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

    }
    
    }  // namespace
    
    void AddDevicesToOp(mlir::Operation* op, const DeviceSet* device_set) {
      if (!device_set) return;
    
      mlir::MLIRContext* ctx = op->getContext();
      mlir::Builder builder(ctx);
    
      // Collect devices with attached metadata.
      llvm::SmallVector<mlir::NamedAttribute, 8> devices;
      devices.reserve(device_set->devices().size());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc

      }
      return mlir_module;
    }
    
    std::string GetDevice(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return device_attr ? device_attr.getValue().str() : "";
    }
    
    bool CanBeIgnoredInCluster(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return !device_attr || device_attr.getValue().empty();
    }
    
    llvm::StringMap<SmallVector<Cluster>> GetClusters(ModuleOp module) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

          op->setAttr(TF::kParallelExecAnnotation, parallel_group_attr);
        }
        auto device_attr = op->getAttr(kDeviceAttr);
        if (!device_attr) {
          op->setAttr(kDeviceAttr, launch.getDeviceAttr());
          return WalkResult::advance();
        }
    
        if (auto device_str_attr = mlir::dyn_cast<StringAttr>(device_attr)) {
          if (device_str_attr.getValue().empty()) {
            op->setAttr(kDeviceAttr, launch.getDeviceAttr());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/readonly_references_to_resources.cc

            mlir::cast<ShapedType>(variable_v2_op.getResult().getType());
        TensorType tensor_type = mlir::cast<TensorType>(DropRefType(shaped_type));
        StringAttr device_attr =
            variable_v2_op->getAttrOfType<StringAttr>("device");
        if (!device_attr) device_attr = builder.getStringAttr("");
        StringRef variable_name =
            GetNodeNameFromClassAttrOrSharedNameAttr(variable_v2_op);
        if (variable_name.empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top