aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/kernels')
-rw-r--r--src/cpu/kernels/CpuActivationKernel.cpp7
-rw-r--r--src/cpu/kernels/CpuActivationKernel.h9
-rw-r--r--src/cpu/kernels/CpuAddKernel.cpp8
-rw-r--r--src/cpu/kernels/CpuAddKernel.h9
-rw-r--r--src/cpu/kernels/CpuIm2ColKernel.cpp7
-rw-r--r--src/cpu/kernels/CpuIm2ColKernel.h8
-rw-r--r--src/cpu/kernels/CpuReshapeKernel.cpp8
-rw-r--r--src/cpu/kernels/CpuReshapeKernel.h9
-rw-r--r--src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h13
-rw-r--r--src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp7
-rw-r--r--src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h9
-rw-r--r--src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp7
-rw-r--r--src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h9
13 files changed, 110 insertions, 0 deletions
diff --git a/src/cpu/kernels/CpuActivationKernel.cpp b/src/cpu/kernels/CpuActivationKernel.cpp
index 8fa7e9525e..70ab06fc8a 100644
--- a/src/cpu/kernels/CpuActivationKernel.cpp
+++ b/src/cpu/kernels/CpuActivationKernel.cpp
@@ -230,6 +230,13 @@ Status CpuActivationKernel::validate(const ITensorInfo *src, const ITensorInfo *
return Status{};
}
+size_t CpuActivationKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
+
void CpuActivationKernel::run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info)
{
// Early exit on disabled activation
diff --git a/src/cpu/kernels/CpuActivationKernel.h b/src/cpu/kernels/CpuActivationKernel.h
index 43c266529f..8e78d86016 100644
--- a/src/cpu/kernels/CpuActivationKernel.h
+++ b/src/cpu/kernels/CpuActivationKernel.h
@@ -57,6 +57,15 @@ public:
*/
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const ActivationLayerInfo &act_info);
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
+
// Inherited methods overridden:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
diff --git a/src/cpu/kernels/CpuAddKernel.cpp b/src/cpu/kernels/CpuAddKernel.cpp
index edbab37301..77aa1ffb3f 100644
--- a/src/cpu/kernels/CpuAddKernel.cpp
+++ b/src/cpu/kernels/CpuAddKernel.cpp
@@ -291,6 +291,14 @@ const char *CpuAddKernel::name() const
{
return _name.c_str();
}
+
+size_t CpuAddKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
+
} // namespace kernels
} // namespace cpu
} // namespace arm_compute
diff --git a/src/cpu/kernels/CpuAddKernel.h b/src/cpu/kernels/CpuAddKernel.h
index 11c0f67132..a0c7e497dd 100644
--- a/src/cpu/kernels/CpuAddKernel.h
+++ b/src/cpu/kernels/CpuAddKernel.h
@@ -70,6 +70,15 @@ public:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
+
private:
using AddKernelPtr = std::add_pointer<void(const ITensor *, const ITensor *, ITensor *, const ConvertPolicy &, const Window &)>::type;
diff --git a/src/cpu/kernels/CpuIm2ColKernel.cpp b/src/cpu/kernels/CpuIm2ColKernel.cpp
index 13764c49d1..5e3385d4ab 100644
--- a/src/cpu/kernels/CpuIm2ColKernel.cpp
+++ b/src/cpu/kernels/CpuIm2ColKernel.cpp
@@ -443,6 +443,13 @@ const char *CpuIm2ColKernel::name() const
{
return "CpuIm2ColKernel";
}
+
+size_t CpuIm2ColKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
} // namespace kernels
} // namespace cpu
} // namespace arm_compute \ No newline at end of file
diff --git a/src/cpu/kernels/CpuIm2ColKernel.h b/src/cpu/kernels/CpuIm2ColKernel.h
index fc8ae056bb..797d54c95c 100644
--- a/src/cpu/kernels/CpuIm2ColKernel.h
+++ b/src/cpu/kernels/CpuIm2ColKernel.h
@@ -91,6 +91,14 @@ public:
// Inherited methods overridden:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
private:
/** Template function to run im2col
diff --git a/src/cpu/kernels/CpuReshapeKernel.cpp b/src/cpu/kernels/CpuReshapeKernel.cpp
index 3bbcc09cc5..91c549643f 100644
--- a/src/cpu/kernels/CpuReshapeKernel.cpp
+++ b/src/cpu/kernels/CpuReshapeKernel.cpp
@@ -134,6 +134,14 @@ const char *CpuReshapeKernel::name() const
{
return "CpuReshapeKernel";
}
+
+size_t CpuReshapeKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
+
} // namespace kernels
} // namespace cpu
} // namespace arm_compute
diff --git a/src/cpu/kernels/CpuReshapeKernel.h b/src/cpu/kernels/CpuReshapeKernel.h
index 9fe4350445..d4e2b44b54 100644
--- a/src/cpu/kernels/CpuReshapeKernel.h
+++ b/src/cpu/kernels/CpuReshapeKernel.h
@@ -57,6 +57,15 @@ public:
// Inherited methods overridden:
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override;
const char *name() const override;
+
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
};
} // namespace kernels
} // namespace cpu
diff --git a/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h b/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
index 3b9a6b4760..ff8b0b143f 100644
--- a/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
+++ b/src/cpu/kernels/assembly/CpuGemmAssemblyWrapperKernel.h
@@ -115,6 +115,19 @@ public:
_name += "/" + kernel_name_tag;
}
}
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override
+ {
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+ }
private:
arm_gemm::GemmCommon<TypeInput, TypeOutput> *_kernel;
diff --git a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
index eed4bb9dd5..a71864c10c 100644
--- a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
+++ b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.cpp
@@ -354,6 +354,13 @@ const char *CpuDepthwiseConv2dAssemblyWrapperKernel::name() const
{
return "CpuDepthwiseConv2dAssemblyWrapperKernel";
}
+
+size_t CpuDepthwiseConv2dAssemblyWrapperKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
} // namespace kernels
} // namespace cpu
} // namespace arm_compute
diff --git a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
index 8ee24a6613..8980922945 100644
--- a/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
+++ b/src/cpu/kernels/internal/CpuDepthwiseConv2dAssemblyWrapperKernel.h
@@ -108,6 +108,15 @@ public:
*/
bool is_configured() const;
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
+
private:
std::unique_ptr<arm_conv::depthwise::IDepthwiseCommon> _kernel_asm;
std::vector<int32_t> _multipliers{};
diff --git a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
index 958c04b677..f9c11fd4bd 100644
--- a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
+++ b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
@@ -274,6 +274,13 @@ void CpuPool2dAssemblyWrapperKernel::create_arm_pooling_requant(const ITensorInf
_kernel_asm = std::move(pooling_kernel_asm);
}
+
+size_t CpuPool2dAssemblyWrapperKernel::get_mws(const CPUInfo &platform, size_t thread_count) const
+{
+ ARM_COMPUTE_UNUSED(platform, thread_count);
+
+ return ICPPKernel::small_network_mws;
+}
} // namespace kernels
} // namespace cpu
} // namespace arm_compute
diff --git a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h
index ab3ed25b1e..8625fd96b4 100644
--- a/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h
+++ b/src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.h
@@ -112,6 +112,15 @@ private:
void create_arm_pooling_requant(const ITensorInfo *src, ITensorInfo *dst, const PoolingLayerInfo &info, const CPUInfo &cpu_info);
std::unique_ptr<arm_conv::pooling::IPoolingCommon> _kernel_asm{ nullptr };
+
+ /** Return minimum workload size of the relevant kernel
+ *
+ * @param[in] platform The CPU platform used to create the context.
+ * @param[in] thread_count Number of threads in the execution.
+ *
+ * @return[out] small_network_mws Minimum workload size for requsted configuration.
+ */
+ size_t get_mws(const CPUInfo &platform, size_t thread_count) const override;
};
} // namespace kernels
} // namespace cpu