aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-10 14:10:08 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit5a65cfd30e571bc5c24e2333e256f2a4b630f8cb (patch)
tree4c8d09361d5edc6bc0313110491a0a5353c44e09
parent8914e32962be3dc8608499e3c0f2f13141493fc4 (diff)
downloadComputeLibrary-5a65cfd30e571bc5c24e2333e256f2a4b630f8cb.tar.gz
COMPMID-1478: Fixed Doxygen comments + minor fixes
- Allow check_bad_style.sh to only run on some of the files - Pass missing lws_hint() in CLNormalizationLayerKernel Change-Id: I2cf44f82f7ba6c8dc8d40691aeec7c6c3de385b5 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143628 Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
-rw-r--r--arm_compute/core/CL/ICLKernel.h8
-rw-r--r--arm_compute/graph/GraphContext.h1
-rw-r--r--arm_compute/graph/backends/CL/CLDeviceBackend.h2
-rw-r--r--arm_compute/graph/frontend/Stream.h2
-rwxr-xr-xscripts/check_bad_style.sh27
-rw-r--r--src/core/CL/kernels/CLNormalizationLayerKernel.cpp2
6 files changed, 29 insertions, 13 deletions
diff --git a/arm_compute/core/CL/ICLKernel.h b/arm_compute/core/CL/ICLKernel.h
index 150dd62a89..f5423584e1 100644
--- a/arm_compute/core/CL/ICLKernel.h
+++ b/arm_compute/core/CL/ICLKernel.h
@@ -62,13 +62,19 @@ private:
return 2 + 2 * dimension_size;
}
using IKernel::configure; //Prevent children from calling IKernel::configure() directly
-public:
+protected:
+ /** Configure the kernel's window and local workgroup size hint.
+ *
+ * @param[in] window The maximum window which will be returned by window()
+ * @param[in] lws_hint (Optional) Local-Workgroup-Size to use.
+ */
void configure_internal(const Window &window, cl::NDRange lws_hint = CLKernelLibrary::get().default_ndrange())
{
_lws_hint = lws_hint;
IKernel::configure(window);
}
+public:
/** Constructor */
ICLKernel()
: _kernel(nullptr), _target(GPUTarget::MIDGARD), _config_id(arm_compute::default_config_id), _max_workgroup_size(0), _lws_hint()
diff --git a/arm_compute/graph/GraphContext.h b/arm_compute/graph/GraphContext.h
index ce6f86f611..b77eb1404d 100644
--- a/arm_compute/graph/GraphContext.h
+++ b/arm_compute/graph/GraphContext.h
@@ -50,6 +50,7 @@ class GraphContext final
public:
/** Constructor */
GraphContext();
+ /** Destructor */
~GraphContext();
/** Prevent instances of this class from being copied (As this class contains pointers) */
GraphContext(const GraphContext &) = delete;
diff --git a/arm_compute/graph/backends/CL/CLDeviceBackend.h b/arm_compute/graph/backends/CL/CLDeviceBackend.h
index cc8d55239e..49e7596d58 100644
--- a/arm_compute/graph/backends/CL/CLDeviceBackend.h
+++ b/arm_compute/graph/backends/CL/CLDeviceBackend.h
@@ -67,7 +67,7 @@ private:
int _context_count; /**< Counts how many contexts are currently using the backend */
CLTuner _tuner; /**< CL kernel tuner */
std::unique_ptr<CLBufferAllocator> _allocator; /**< CL buffer affinity allocator */
- std::string _tuner_file; /** Filename to load/store the tuner's values from */
+ std::string _tuner_file; /**< Filename to load/store the tuner's values from */
};
} // namespace backends
} // namespace graph
diff --git a/arm_compute/graph/frontend/Stream.h b/arm_compute/graph/frontend/Stream.h
index c8e24eeae2..9d51016178 100644
--- a/arm_compute/graph/frontend/Stream.h
+++ b/arm_compute/graph/frontend/Stream.h
@@ -75,7 +75,7 @@ public:
private:
//Important: GraphContext must be declared *before* the GraphManager because the GraphManager
- //allocates resources from the context and therefore needs to be destroyed before the context during clean up).
+ //allocates resources from the context and therefore needs to be destroyed before the context during clean up.
GraphContext _ctx; /**< Graph context to use */
GraphManager _manager; /**< Graph manager */
Graph _g; /**< Internal graph representation of the stream */
diff --git a/scripts/check_bad_style.sh b/scripts/check_bad_style.sh
index 292cf518cd..b3e0b39be5 100755
--- a/scripts/check_bad_style.sh
+++ b/scripts/check_bad_style.sh
@@ -2,9 +2,18 @@
set -e
-DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils ./support"
+ALL_DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils ./support"
-grep -HrnP --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "/\*\*$" $DIRECTORIES | tee bad_style.log
+#If no arguments were passed: default to check all the folders:
+if [ ! -n "$1" ]
+then
+ FILES=$ALL_DIRECTORIES
+else
+ #else only check the files that were passed on the command line:
+ FILES=$@
+fi
+
+grep -HrnP --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "/\*\*$" $FILES | tee bad_style.log
if (( `cat bad_style.log | wc -l` > 0 ))
then
echo ""
@@ -12,7 +21,7 @@ then
exit -1
fi
-grep -Hnr --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm --exclude=Doxyfile "@brief" $DIRECTORIES | tee bad_style.log
+grep -Hnr --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm --exclude=Doxyfile "@brief" $FILES | tee bad_style.log
if (( `cat bad_style.log | wc -l` > 0 ))
then
echo ""
@@ -20,7 +29,7 @@ then
exit -1
fi
-grep -HnRE --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "\buint " --exclude-dir=cl_kernels --exclude-dir=cs_shaders $DIRECTORIES | tee bad_style.log
+grep -HnRE --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "\buint " --exclude-dir=cl_kernels --exclude-dir=cs_shaders $FILES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -28,7 +37,7 @@ then
exit -1
fi
-grep -HnR --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "float32_t" $DIRECTORIES | tee bad_style.log
+grep -HnR --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "float32_t" $FILES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -36,7 +45,7 @@ then
exit -1
fi
-grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "arm[_ ]\?cv" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "arm[_ ]\?cv" $FILES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -44,7 +53,7 @@ then
exit -1
fi
-grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#.*if.*defined[^(]" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#.*if.*defined[^(]" $FILES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -52,7 +61,7 @@ then
exit -1
fi
-grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#else$\|#endif$" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#else$\|#endif$" $FILES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -69,7 +78,7 @@ then
fi
spdx_missing=0
-for f in $(find $DIRECTORIES -type f)
+for f in $(find $FILES -type f)
do
if [[ $(grep SPDX $f | wc -l) == 0 ]]
then
diff --git a/src/core/CL/kernels/CLNormalizationLayerKernel.cpp b/src/core/CL/kernels/CLNormalizationLayerKernel.cpp
index 8a7b7aed22..eb1ad68cd3 100644
--- a/src/core/CL/kernels/CLNormalizationLayerKernel.cpp
+++ b/src/core/CL/kernels/CLNormalizationLayerKernel.cpp
@@ -172,7 +172,7 @@ void CLNormalizationLayerKernel::run(const Window &window, cl::CommandQueue &que
unsigned int idx = 0;
add_3D_tensor_argument(idx, _input, slice);
add_3D_tensor_argument(idx, _output, slice);
- enqueue(queue, *this, slice);
+ enqueue(queue, *this, slice, lws_hint());
}
while(window_collapsed.slide_window_slice_3D(slice));
}