Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for DeviceSet (0.31 sec)

  1. tensorflow/compiler/jit/device_util.cc

    namespace tensorflow {
    namespace jit {
    
    void DeviceSet::Insert(DeviceId device_id) {
      int word_index = device_id.id() / kWordSize;
      int bit_index = device_id.id() % kWordSize;
      const int storage_size = storage_.size();
      if (word_index >= storage_size) {
        storage_.resize(word_index + 1, 0);
      }
    
      storage_[word_index] |= (1ull << bit_index);
    }
    
    void DeviceSet::UnionWith(const DeviceSet& other) {
    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/jit/device_util.h

      explicit DeviceId(int id) : id_(id) {}
    
      int id() const { return id_; }
    
      friend class DeviceInfoCache;
      friend class DeviceSet;
    };
    
    // A set of DeviceIds, represented as a bitmap.
    class DeviceSet {
     public:
      void Insert(DeviceId device_id);
      void UnionWith(const DeviceSet& other);
      bool IsEmpty() const;
    
      // Calls `func` on each DeviceId in the set.  Stops iterating early if `func`
      // return false.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 17:18:31 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/mlir_graph_optimization_pass_test.cc

    class MockMlirOptimizationPass : public MlirOptimizationPass {
     public:
      MOCK_METHOD(llvm::StringRef, name, (), (const, override));
      MOCK_METHOD(MlirOptimizationPassState, GetPassState,
                  (const DeviceSet* device_set, const ConfigProto& config_proto,
                   const Graph& graph,
                   const FunctionLibraryDefinition& function_library),
                  (const, override));
      MOCK_METHOD(Status, Run,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 08:25:30 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/mlir_graph_optimization_pass.h

      // `function_library` contains function definitions for function calls in
      // `graph` not included in the `graph` FunctionLibraryDefinition.
      virtual MlirOptimizationPassState GetPassState(
          const DeviceSet* device_set, const ConfigProto& config_proto,
          const Graph& graph,
          const FunctionLibraryDefinition& function_library) const = 0;
    
      virtual Status Run(const std::string& function_name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 03 22:53:34 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/device_util_test.cc

    namespace {
    
    Status PickDeviceHelper(bool allow_mixing_unknown_and_cpu,
                            absl::Span<const absl::string_view> device_names,
                            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(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

        } else {
          devices->AddDevice(device);
        }
      }
    
      return mlir::success();
    }
    
    }  // 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.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/graph_optimization_pass.h

     public:
      llvm::StringRef name() const override { return "graph_optimization"; }
    
      ::tensorflow::MlirOptimizationPassState GetPassState(
          const ::tensorflow::DeviceSet* device_set,
          const ::tensorflow::ConfigProto& config_proto,
          const tensorflow::Graph& graph,
          const tensorflow::FunctionLibraryDefinition& function_library)
          const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 21 23:21:47 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfr/integration/graph_decompose_pass.h

      // Whether to run this pass. If this is enabled, the GraphDef will be imported
      // to MLIR even no tf composition file is found.
      ::tensorflow::MlirOptimizationPassState GetPassState(
          const DeviceSet* device_set, const ConfigProto& config_proto,
          const Graph& graph,
          const FunctionLibraryDefinition& function_library) const override;
    
      // This should be used as a thin mapper around mlir::ModulePass::runOnModule
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/device_util.h

    //   /job:<name>/replica:<replica>/task:<task>/device:<type>:<device_num>
    //
    // Supported device metadata types:
    // (1) GpuDeviceMetadata: GPU device compute capability.
    void AddDevicesToOp(mlir::Operation* op, const DeviceSet* device_set);
    
    // Collects devices information from an op `tf.devices` attributes. Returns
    // failure if can't parse device metadata from the attribute.
    mlir::LogicalResult GetDevicesFromOp(mlir::Operation* op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 05 20:02:33 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfr/integration/graph_decompose_pass.cc

                                    "The number of graphs being op expanded.");
    }  // namespace
    
    namespace tfr {
    
    MlirOptimizationPassState GraphDecomposePass::GetPassState(
        const DeviceSet* device_set, const ConfigProto& config_proto,
        const Graph& graph,
        const FunctionLibraryDefinition& function_library) const {
      const char* tfr_lib_env_val = getenv(std::string(kTFRLibEnv).c_str());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Feb 25 16:22:36 UTC 2024
    - 2.8K bytes
    - Viewed (0)
Back to top