aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-05-31 17:59:59 +0200
committerAdrian Kummerlaender2019-05-31 17:59:59 +0200
commitdd52d0da851eb5c232acfa0ae759e5274ed09125 (patch)
tree71f416ec93d592a22656b6a9e966eb15a7c67cad
parentf0e2a04dbe47f40df537456acb1ead4bd5dd72df (diff)
downloadsymlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar.gz
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar.bz2
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar.lz
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar.xz
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.tar.zst
symlbm_playground-dd52d0da851eb5c232acfa0ae759e5274ed09125.zip
Try out various OpenCL work group sizes using a Jupyter notebook
This is actually quite nice for this kind of experimentation!
-rw-r--r--implosion.py18
-rw-r--r--inspect_opencl_layout.ipynb590
2 files changed, 600 insertions, 8 deletions
diff --git a/implosion.py b/implosion.py
index 75b2fee..0851158 100644
--- a/implosion.py
+++ b/implosion.py
@@ -1,6 +1,5 @@
import pyopencl as cl
mf = cl.mem_flags
-from pyopencl.tools import get_gl_sharing_context_properties
from string import Template
@@ -77,8 +76,9 @@ __kernel void collide_and_stream(__global float* f_a,
__global float* moments,
__global const int* material)
{
- const unsigned int gid = get_global_id(0);
- const uint2 cell = cellAtIndex(gid);
+ const unsigned int gid = indexOfCell(get_global_id(0), get_global_id(1));
+
+ const uint2 cell = (uint2)(get_global_id(0), get_global_id(1));
const int m = material[gid];
@@ -96,7 +96,7 @@ __kernel void collide_and_stream(__global float* f_a,
}
}
- moments[gid] = d;
+ moments[1*gid] = d;
moments[2*gid] = v.x;
moments[3*gid] = v.y;
}"""
@@ -175,11 +175,11 @@ class D2Q9_BGK_Lattice:
def evolve(self):
if self.tick:
self.tick = False
- self.program.collide_and_stream(self.queue, (self.nCells,), None, self.cl_pop_a, self.cl_pop_b, self.cl_moments, self.cl_material)
+ self.program.collide_and_stream(self.queue, (self.nX,self.nY), (16,64), self.cl_pop_a, self.cl_pop_b, self.cl_moments, self.cl_material)
self.queue.finish()
else:
self.tick = True
- self.program.collide_and_stream(self.queue, (self.nCells,), None, self.cl_pop_b, self.cl_pop_a, self.cl_moments, self.cl_material)
+ self.program.collide_and_stream(self.queue, (self.nX,self.nY), (16,64), self.cl_pop_b, self.cl_pop_a, self.cl_moments, self.cl_material)
self.queue.finish()
def show(self, i):
@@ -197,9 +197,9 @@ class D2Q9_BGK_Lattice:
def MLUPS(cells, steps, time):
return ((cells*steps) / time) / 1000000
-LBM = D2Q9_BGK_Lattice(2000, 2000)
+LBM = D2Q9_BGK_Lattice(1024, 1024)
-nUpdates = 100
+nUpdates = 1000
start = timer()
@@ -214,3 +214,5 @@ print("Cells: " + str(LBM.nCells))
print("Updates: " + str(nUpdates))
print("Time: " + str(runtime))
print("MLUPS: " + str(MLUPS(LBM.nCells, nUpdates, end - start)))
+
+LBM.show(nUpdates)
diff --git a/inspect_opencl_layout.ipynb b/inspect_opencl_layout.ipynb
new file mode 100644
index 0000000..ac7c72f
--- /dev/null
+++ b/inspect_opencl_layout.ipynb
@@ -0,0 +1,590 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Thread layouting in OpenCL\n",
+ "## Setup PyOpenCL"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import pyopencl as cl\n",
+ "import numpy"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "platform = cl.get_platforms()[0]\n",
+ "context = cl.Context(properties=[(cl.context_properties.PLATFORM, platform)])\n",
+ "queue = cl.CommandQueue(context)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "<pyopencl.Platform 'NVIDIA CUDA' at 0x280eab0>"
+ ]
+ },
+ "execution_count": 58,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "platform"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Initialize array for storing group and local IDs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "nX = 16\n",
+ "nY = 16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "np_data = numpy.ndarray(shape=(nX*nY, 4), dtype=numpy.int32)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "np_data[:,:] = 0"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0],\n",
+ " [0, 0, 0, 0],\n",
+ " [0, 0, 0, 0],\n",
+ " ...,\n",
+ " [0, 0, 0, 0],\n",
+ " [0, 0, 0, 0],\n",
+ " [0, 0, 0, 0]], dtype=int32)"
+ ]
+ },
+ "execution_count": 62,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "cl_data = cl.Buffer(context, cl.mem_flags.READ_WRITE | cl.mem_flags.USE_HOST_PTR, hostbuf=np_data)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "<pyopencl._cl.Buffer at 0x7fd9da045468>"
+ ]
+ },
+ "execution_count": 64,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "cl_data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Define OpenCL kernel\n",
+ "\n",
+ "Simply writes out group and local indices to the given data array."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "program = cl.Program(context, \"\"\"\n",
+ "__kernel void test(__global int* data)\n",
+ "{\n",
+ " const unsigned int gid = 4*(get_global_id(1)*get_global_size(1) + get_global_id(0));\n",
+ " data[gid + 0] = get_group_id(0);\n",
+ " data[gid + 1] = get_group_id(1);\n",
+ " data[gid + 2] = get_local_id(0);\n",
+ " data[gid + 3] = get_local_id(1);\n",
+ "}\"\"\").build()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Test output for a 1x1 work group size:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 66,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[ 0, 0, 0, 0],\n",
+ " [ 1, 0, 0, 0],\n",
+ " [ 2, 0, 0, 0],\n",
+ " ...,\n",
+ " [13, 15, 0, 0],\n",
+ " [14, 15, 0, 0],\n",
+ " [15, 15, 0, 0]], dtype=int32)"
+ ]
+ },
+ "execution_count": 66,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "program.test(queue, (nX,nY), (1,1), cl_data)\n",
+ "queue.finish()\n",
+ "cl.enqueue_copy(queue, np_data, cl_data).wait();\n",
+ "np_data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Test various work group sizes"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def computeWorkgroup(i, j):\n",
+ " program.test(queue, (nX,nY), (i,j), cl_data)\n",
+ " queue.finish()\n",
+ " cl.enqueue_copy(queue, np_data, cl_data).wait();"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],\n",
+ " [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]], dtype=int32)"
+ ]
+ },
+ "execution_count": 68,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "computeWorkgroup(4,4)\n",
+ "np_data.reshape((nX, nY, 4))[:,:,0] # x-index of work group"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]], dtype=int32)"
+ ]
+ },
+ "execution_count": 69,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data.reshape((nX, nY, 4))[:,:,1] # y-index of work group"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "computeWorkgroup(8,2)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]], dtype=int32)"
+ ]
+ },
+ "execution_count": 71,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data.reshape((nX, nY, 4))[:,:,0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],\n",
+ " [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],\n",
+ " [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],\n",
+ " [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],\n",
+ " [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],\n",
+ " [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],\n",
+ " [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],\n",
+ " [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],\n",
+ " [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],\n",
+ " [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]], dtype=int32)"
+ ]
+ },
+ "execution_count": 72,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data.reshape((nX, nY, 4))[:,:,1]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7],\n",
+ " [0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7]], dtype=int32)"
+ ]
+ },
+ "execution_count": 73,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data.reshape((nX, nY, 4))[:,:,2]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
+ " [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
+ " [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], dtype=int32)"
+ ]
+ },
+ "execution_count": 74,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "np_data.reshape((nX, nY, 4))[:,:,3]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Generate some visuals"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 81,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def plotWorkgroupConfig(i,j):\n",
+ " computeWorkgroup(i,j)\n",
+ " data = np_data.reshape((nX, nY, 4))\n",
+ " for k in range(0,4):\n",
+ " plt.subplot(1,4,k+1)\n",
+ " plt.imshow(np_data.reshape((nX, nY, 4))[:,:,k])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 82,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAABrCAYAAABnlHmpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAACAxJREFUeJzt3U1oXNcZxvHn1YwlTZPKkj+jJnGahbNI7EKKiAktbSAtuN04m5Y4Gy0MLoFsuigVdBG6ate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ZI2txJCtFGe+ZJuvGPKNIdtCG7qZlST9VNI3JD0s6biZPVxkDVt0RtLRhrkpSdPuflDSdHXcMyLKVoosX7LNV0T5nlGPZ1v0Dv0xSTPufsXdVyS9JOlYwTW05e6vS7rZMH1M0tnq67OSniq0qPaiyFaKMl+yzVcU+caQbdEN/V5J12rGs9W5GOx39zlJqh73Ba6nUczZSr2dL9nmK+Z8eyrbohu6tZjjbTbZINv8kG2+yDcjRTf0WUn314zvkxTLbza+YWbjklQ9zgeup1HM2Uq9nS/Z5ivmfHsq26Ib+kVJB83sQTMblPS0pHMF19Cpc5Imq68nJb0csJZWYs5W6u18yTZfMefbW9m6e6H/SPqmpLclvSPpB0Wff4s1vihpTtKq1ncPJyTt1vpT7MvV467QdcaYbaz5ki35xpAtnxQFgETwSVEASAQNHQASQUMHgETQ0AEgETR0AEgEDR0AEkFDB4BE0NABIBH/A/6TJLQTZrhjAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<Figure size 432x288 with 4 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plotWorkgroupConfig(1,1)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAABrCAYAAABnlHmpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAB6NJREFUeJzt3U+IXeUZx/Hf00mMSWhL4vhn6p9WJIKiRcqQ4kYEkcRuRiiVRApZBETBTVcOdOHGRVYuBBFDCclGpbhJoAGxgdZFKWRKS0gLJqOJmakxcUz8A5V0Rh4Xcw03Jzfek3POe859n/v9QLj3nNx5z8NvXh4O58y5r7m7AAD5+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ybbuh24B9/JlNM8g2HbJNi3wb0nZDX5R0Z9/2HZI+brmGqs6Z2ZQk9V7Pd1xPUc7ZSqOdL9mmlXO+I5Vt2w39qKQtZna3md0gaYekQy3XUNUhSbt673dJOthhLYPknK002vmSbVo55zta2bp7q/8k/UrSCUkfSPp928cvWeObks5KWtbq2cNuSTdp9S72yd7r5q7rzDHbXPMlW/LNIVueFAWAIHhSFACCoKEDQBA0dAAIgoYOAEHQ0AEgCBo6AARBQweAIGjoABDEt1uHTloE0FJaAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<Figure size 432x288 with 4 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plotWorkgroupConfig(4,4)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 84,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAABrCAYAAABnlHmpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAB9JJREFUeJzt3c9rHPcdxvHn41WyqxgEkexEyo/WwTgEUUwowqWXEgjFbi/upSbOwSYYAoVeeqqhh177D5SCD8a+JKH0Eh8cRGpoc+hFKgkmLcRWEztS7dpR3ITg1K4kPj1oa3ZnR9Fqdma+8/36/QIzO+OR5uHx+sPszK5k7i4AQPx2hQ4AACgHAx0AEsFAB4BEMNABIBEMdABIBAMdABLBQAeARDDQASARIw10MztiZh+Z2ZKZnS4rFDbRb3Xotjp0G44V/aSombUkXZH0Q0krkhYkHXf3v2/1NY9a2zvaXeh4VXj+4NehIwz46+X7q+6+d6f9Nq3bJvpK/y7UrZTfr413+tbXx1sDX7fR7l/39uD/t057rW99cuzuwD5TrfW+9SuXHxvYJ5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Srkj6h6Rf1X38ITO+KemmpDVtnj2ckjSlzbvYV7vLydA5Y+w21n7pln5j6JZPigJAIvikKAAkgoEOAIlgoANAIhjoAJAIBjoAJIKBDgCJYKADQCIY6ACQiP8BpLw4oSzcg78AAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<Figure size 432x288 with 4 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plotWorkgroupConfig(8,8)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 85,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAABrCAYAAABnlHmpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAACCdJREFUeJzt3V+IXGcZx/Hfk5nsn7bGbP6nf1NKiqxtqbqkCEULRRK9iRdaml4YSiAg9EYQDHpRBC+8FESEICG5aYvkphFTYxuxFRRJxKCt0GRtk+5202zXxKptk90kjxc7LnNmZp3ZM+ff+873A+HM++bsnie/Pfvk5Jx5s+buAgCEb1XZBQAAskFDB4BI0NABIBI0dACIBA0dACJBQweASNDQASASNHQAiERfDd3MdpnZm2Y2aWYHsioKi8g3P2SbH7Itj6VdKWpmNUlnJX1J0rSkU5L2uPvflvuYIRv2Ed2a6niD4t+6MufuG1eaL9l2lzZbqXO+trqe3KneMpZ0s568ZvK6te9TU8s+7cf31n1qHb5vO8zV6zcT46FV19v2Gakl50ZXzbftM2oLLePkn+v81ILmLt8w+kI+/nfudtuvw6nTsx2SJt39LUkysxck7Za07BduRLfqEXu8j0PG7xU/eqHxckX5km13abOVOudb37A5Mb65aazt4+Y3JBvV1fXt33JXx5LN8dpYe9OfX5ts1gtrb7TtU/9keyNev/Y/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AkWCkKAJGgoQNAJGjoABAJGjoARIKGDgCRoKEDQCRo6AAQCRo6AETiv+qQRIYl3vsZAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<Figure size 432x288 with 4 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "plotWorkgroupConfig(16,2)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.7.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}