- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for TargetHardware (0.2 sec)
-
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) -
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) -
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) -
tensorflow/compiler/mlir/lite/experimental/tac/hardwares/target_hardware.cc
std::string unique_name; std::string description; mlir::TypeID type_id; std::unique_ptr<TargetHardware> target_hardware; std::function<std::unique_ptr<TargetHardware>()> target_hardware_factory; }; struct RegisteredTargetHardwareOps { explicit RegisteredTargetHardwareOps(mlir::TypeID hardware_type) : hardware_typeid(hardware_type) {} // Key is the Operation TypeID
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 09 21:39:59 UTC 2023 - 9.9K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
tensorflow/compiler/mlir/lite/experimental/tac/README.md
``` std::unique_ptr<TargetHardware> CreateFooHardware() { return std::make_unique<FooHardware>(); } TargetHardwareRegistration<FooHardware> foo_hardware( "Target device for FOO", CreateFooHardware); ``` ### Advanced user For advanced users (e.g., you may already have your own hardware dialect defined), please just use `TargetHardware` directly. See the following code snippet for reference.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 29 18:32:13 UTC 2022 - 11.6K bytes - Viewed (0) -
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)