- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for GetOpCost (0.24 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/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/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/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)