Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TargetHardware (0.35 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/tac_module.h

      std::vector<std::unique_ptr<tac::TargetHardware>> InstantiateBackends();
    
      std::unique_ptr<TacImporter> importer_;
      std::unique_ptr<TacExporter> exporter_;
      // Owned list of all target hardware backends.
      std::vector<std::unique_ptr<tac::TargetHardware>> backends_;
      // Holder for const pointers for the data in 'backends_'
      std::vector<const tac::TargetHardware*> const_backends_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/target_hardware.h

    // define static member variable that retrieves string identifying the Target
    // Hardware. Example,
    // class MyType : public TargetHardware {
    //  public:
    //   static constexpr char kId[] = "MyHardware";
    // };
    class TargetHardware {
     public:
      virtual ~TargetHardware() = default;
    
      // Initializes all TargetHardwareOperation registered for this hardware.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 09 21:39:59 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/gpu_hardware.h

    class GpuHardware : public TargetHardware {
     public:
      static constexpr char kId[] = "GPU";
      mlir::RewritePatternSet GetTransformations(
          MLIRContext* context) const override;
    
      mlir::TypeID GetTypeId() const override {
        return mlir::TypeID::get<GpuHardware>();
      }
    
      double GetHardwareSwitchingCost(const TargetHardware* from,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 27 15:05:02 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/simple_hardware.cc

    namespace tac {
    
    bool SimpleHardware::IsOpSupported(mlir::Operation* op) const {
      if (IsNotSupportedOp(op)) {
        return false;
      }
      const TargetHardware* cpu = GetTargetHardware("CPU");
      return cpu->IsOpSupported(op);
    }
    
    double SimpleHardware::GetHardwareSwitchingCost(const TargetHardware* from,
                                                    size_t buffer_size) const {
      auto from_type = from->GetTypeId();
      auto to_type = GetTypeId();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jul 21 01:22:53 UTC 2021
    - 1.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/tac_module.cc

      if (failed(pm.run(*module))) {
        return absl::InternalError("conversion error");
      }
      return absl::OkStatus();
    }
    
    std::vector<std::unique_ptr<tac::TargetHardware>>
    TacModule::InstantiateBackends() {
      std::vector<std::unique_ptr<tac::TargetHardware>> backends;
      for (const auto& hardware_name : options_.hardware_backends) {
        auto factory = tac::GetTargetHardwareFactory(hardware_name);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/simple_hardware.h

    // can also specify the advantage over CPU.
    //
    // If you need more customization, e.g., if you have your own hardware dialect,
    // please consider use TargetHardware directly.
    class SimpleHardware : public TargetHardware {
     public:
      // This is essentially a denylist.
      // TODO(renjieliu): Consider whether we want an allowlist for custom op as
      // well.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jul 21 01:22:53 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/cpu_hardware.cc

    // This is used by TAC to get op supported/ op cost estimates on CPU.
    class CpuHardware : public TargetHardware {
     public:
      MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CpuHardware)
    
      // String Identifier for CPU hardware.
      static constexpr char kId[] = "CPU";
    
      double GetHardwareSwitchingCost(const TargetHardware* from,
                                      size_t buffer_size) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/examples/example_hardware.cc

      mlir::RewritePatternSet patterns(context);
    
      patterns.add<LowerPackIntoConcatReshape, UnrollSplit, UnrollSplitV, PadSlice,
                   PadConcat>(context);
      return patterns;
    }
    
    std::unique_ptr<TargetHardware> CreateExampleHardware() {
      return std::make_unique<ExampleHardware>();
    }
    
    TargetHardwareRegistration<ExampleHardware> example_hardware(
        "Example device", CreateExampleHardware);
    
    }  // namespace tac
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/hardwares/gpu_hardware.cc

                   EnsureBiasForConv2d, PadSlice, FullyConnectedToConv, PadConcat,
                   SquaredDifference>(context);
      return patterns;
    }
    
    double GpuHardware::GetHardwareSwitchingCost(const TargetHardware* from,
                                                 size_t buffer_size) const {
      auto from_type = from->GetTypeId();
      auto to_type = GetTypeId();
      if (from_type == to_type) return 0.0f;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/experimental/tac/transforms/tac_pass.h

      explicit TacPass(const TacModule* module)
          : OperationPass<T>::OperationPass(mlir::TypeID::get<T>()),
            module_(module) {}
    
      ~TacPass() override = default;
    
      const TargetHardware* GetTargetHardware(
          const std::string& hardware_name) const {
        return module_ != nullptr
                   ? module_->GetTargetHardware(hardware_name)
                   : mlir::TFL::tac::GetTargetHardware(hardware_name);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top