- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for GetOpCost (0.28 sec)
-
tensorflow/compiler/mlir/lite/experimental/tac/hardwares/gpu_hardware.cc
// tfl.space_to_depth / tfl.sqrt / tfl.square / tfl.squared_difference / // tfl.strided_slice / tfl.tanh / tfl.transpose / tfl.transpose_conv class GpuBasicSupportedOpNoCost : public TargetHardwareOperation { double GetOpCost(mlir::Operation* op) const override { return 0; } bool IsOpSupported(mlir::Operation* op) const override { InferenceType inference_type = GetInferenceType(op); if (inference_type != FLOAT) { return false;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 06 03:08:33 UTC 2023 - 7.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/hardwares/simple_hardware.cc
return buffer_size * kCrossHardwareTransferPerByteCost / 8.0 + kCrossHardwareTransferFixedCost; } double SimpleHardware::GetOpCost(mlir::Operation* op) const { const TargetHardware* cpu = GetTargetHardware("CPU"); return cpu->GetOpCost(op) / AdvantageOverCPU(); } } // namespace tac } // namespace TFL
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/hardwares/cpu_hardware.cc
Create); // Operation costs on CPU // Currently used for these ops: // tfl.conv_2d / tfl.depthwise_conv_2d / tfl.fully_connected class CpuConvOp : public TargetHardwareOperation { double GetOpCost(mlir::Operation* op) const override { float cost = 0.0; int64_t arithmetic_count; if (ArithmeticCountUtilHelper::GetArithmeticCountForConvAndFullyconnectedOp( op, &arithmetic_count)) {
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/hardwares/nnapi_hardware.cc
"Target device for NNAPI", CreateNNAPIHardware); // Currently used for these ops: // tfl.squared_difference class NNAPIBasicSupportedOpNoCost : public TargetHardwareOperation { double GetOpCost(mlir::Operation* op) const override { return 0; } bool IsOpSupported(mlir::Operation* op) const override { return true; } }; std::unique_ptr<TargetHardwareOperation> CreateBasicOpNoCost() {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 06 03:08:33 UTC 2023 - 3.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/hardwares/target_hardware.cc
for (auto& op_factory : op_factories) { hardware_ops_.emplace_back(op_factory.getSecond()()); } break; } return true; } double TargetHardware::GetOpCost(mlir::Operation* op) const { auto* registered_ops = getRegisteredOperationsForHardware(GetTypeId()); if (registered_ops == nullptr) { return kDefaultFixedValuedCost; }
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/tflite_import_export.cc
auto* target_hardware = mlir::TFL::tac::GetTargetHardware(device); float cost = -1; if (target_hardware->IsOpSupported(op)) { cost = target_hardware->GetOpCost(op); } mlir::StringAttr device_identifier = mlir::StringAttr::get(module.getContext(), device); auto float_type = mlir::FloatType::getF32(module.getContext()); auto float_attr =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 4.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/hardwares/target_hardware.h
// Users should implement the interface and use TargetHardwareOpRegistration // for registering the operation. class TargetHardwareOperation { public: virtual ~TargetHardwareOperation() = default; virtual double GetOpCost(mlir::Operation* op) const = 0; virtual bool IsOpSupported(mlir::Operation* op) const = 0; }; // Abstract base class for a hardware. // To introduce new 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/simple_hardware.h
private: bool IsOpSupported(mlir::Operation* op) const override; double GetHardwareSwitchingCost(const TargetHardware* from, size_t buffer_size) const override; double GetOpCost(mlir::Operation* op) const override; }; } // namespace tac } // namespace TFL } // namespace mlir
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/transforms/cost_model.cc
auto* device_hardware = GetTargetHardware(hardware); if (device_hardware == nullptr) { return kDefaultFixedValuedCost; } return device_hardware->GetOpCost(op); } float GetCostForFunc(func::FuncOp* func, const std::string& hardware) { auto* device_hardware = GetTargetHardware(hardware); if (device_hardware == nullptr) { return kDefaultFixedValuedCost;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/README.md
double GetHardwareSwitchingCost(const TargetHardware* from, size_t buffer_size) const override { // Get the hardware switching cost from the source hardware. } double GetOpCost(mlir::Operation* op) const override { // call customized cost model. } mlir::RewritePatternSet GetTransformations( MLIRContext* context) const override {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 29 18:32:13 UTC 2022 - 11.6K bytes - Viewed (0)