diff --git a/dace/jupyter.py b/dace/jupyter.py index 0f338908cd..c7ac85d6ee 100755 --- a/dace/jupyter.py +++ b/dace/jupyter.py @@ -8,7 +8,7 @@ def _connected(): try: - urllib.request.urlopen('https://spcl.github.io/dace/webclient2/dist/sdfv.js', timeout=1) + urllib.request.urlopen('https://spcl.github.io/dace-webclient/dist/sdfv.js', timeout=1) return True except urllib.error.URLError: return False @@ -31,31 +31,22 @@ def isnotebook(): def preamble(): # Emit javascript headers for SDFG renderer sdfv_js_deps = ['sdfv.js'] - sdfv_css_deps = ['sdfv.css'] + offline_sdfv_js_deps = ['sdfv_jupyter.js'] result = '' - # Rely on internet connection for Material icons - result += '' - # Try to load dependencies from online sources if _connected(): for dep in sdfv_js_deps: - result += '\n' % dep - for dep in sdfv_css_deps: - result += '\n' % dep + result += '\n' % dep return result # Load local dependencies - root_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'dace', 'viewer', 'webclient') - for dep in sdfv_js_deps: + root_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'viewer', 'webclient') + for dep in offline_sdfv_js_deps: file = os.path.join(root_path, 'dist', dep) - with open(file, 'r') as fp: + with open(file) as fp: result += '\n' % fp.read() - for dep in sdfv_css_deps: - file = os.path.join(root_path, dep) - with open(file, 'r') as fp: - result += '\n' % fp.read() # Run this code once return result diff --git a/dace/sdfg/sdfg.py b/dace/sdfg/sdfg.py index eb43a99a54..9db6f3f22b 100644 --- a/dace/sdfg/sdfg.py +++ b/dace/sdfg/sdfg.py @@ -1429,9 +1429,13 @@ def _repr_html_(self): # Create renderer canvas and load SDFG result += """ +
+
+\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -834,81 +818,6 @@ "446 ms ± 41.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n" ] }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - ":4: NumbaWarning: \u001b[1m\n", - "Compilation is falling back to object mode WITH looplifting enabled because Function \"someforloop\" failed type inference due to: \u001b[1mUntyped global name 'element_update':\u001b[0m \u001b[1m\u001b[1mCannot determine Numba type of \u001b[0m\n", - "\u001b[1m\n", - "File \"\", line 7:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - " \n", - " for j in range(A.shape[1]):\n", - "\u001b[1m A[i, j] = element_update(A[i, j])\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\n", - " def someforloop(A):\n", - ":4: NumbaWarning: \u001b[1m\n", - "Compilation is falling back to object mode WITHOUT looplifting enabled because Function \"someforloop\" failed type inference due to: \u001b[1m\u001b[1mCannot determine Numba type of \u001b[0m\n", - "\u001b[1m\n", - "File \"\", line 5:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - "\u001b[1m for i in range(A.shape[0]):\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\n", - " def someforloop(A):\n", - "/home/user/anaconda3/envs/py38/lib/python3.8/site-packages/numba/core/object_mode_passes.py:151: NumbaWarning: \u001b[1mFunction \"someforloop\" was compiled in object mode without forceobj=True, but has lifted loops.\n", - "\u001b[1m\n", - "File \"\", line 5:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - "\u001b[1m for i in range(A.shape[0]):\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\n", - " warnings.warn(errors.NumbaWarning(warn_msg,\n", - "/home/user/anaconda3/envs/py38/lib/python3.8/site-packages/numba/core/object_mode_passes.py:161: NumbaDeprecationWarning: \u001b[1m\n", - "Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.\n", - "\n", - "For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit\n", - "\u001b[1m\n", - "File \"\", line 5:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - "\u001b[1m for i in range(A.shape[0]):\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\n", - " warnings.warn(errors.NumbaDeprecationWarning(msg,\n", - ":4: NumbaWarning: \u001b[1m\n", - "Compilation is falling back to object mode WITHOUT looplifting enabled because Function \"someforloop\" failed type inference due to: \u001b[1mUntyped global name 'element_update':\u001b[0m \u001b[1m\u001b[1mCannot determine Numba type of \u001b[0m\n", - "\u001b[1m\n", - "File \"\", line 7:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - " \n", - " for j in range(A.shape[1]):\n", - "\u001b[1m A[i, j] = element_update(A[i, j])\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\u001b[0m\n", - " def someforloop(A):\n", - "/home/user/anaconda3/envs/py38/lib/python3.8/site-packages/numba/core/object_mode_passes.py:151: NumbaWarning: \u001b[1mFunction \"someforloop\" was compiled in object mode without forceobj=True.\n", - "\u001b[1m\n", - "File \"\", line 5:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - "\u001b[1m for i in range(A.shape[0]):\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\n", - " warnings.warn(errors.NumbaWarning(warn_msg,\n", - "/home/user/anaconda3/envs/py38/lib/python3.8/site-packages/numba/core/object_mode_passes.py:161: NumbaDeprecationWarning: \u001b[1m\n", - "Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.\n", - "\n", - "For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit\n", - "\u001b[1m\n", - "File \"\", line 5:\u001b[0m\n", - "\u001b[1mdef someforloop(A):\n", - "\u001b[1m for i in range(A.shape[0]):\n", - "\u001b[0m \u001b[1m^\u001b[0m\u001b[0m\n", - "\u001b[0m\n", - " warnings.warn(errors.NumbaDeprecationWarning(msg,\n" - ] - }, { "name": "stdout", "output_type": "stream", diff --git a/tutorials/codegen.ipynb b/tutorials/codegen.ipynb index 0de9fab2d9..a6effd7996 100644 --- a/tutorials/codegen.ipynb +++ b/tutorials/codegen.ipynb @@ -32,22 +32,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -83,15 +68,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (simple)" ] }, "execution_count": 2, @@ -822,7 +812,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.12.1" } }, "nbformat": 4, diff --git a/tutorials/explicit.ipynb b/tutorials/explicit.ipynb index 5ecd3fe590..7f9fbbd866 100644 --- a/tutorials/explicit.ipynb +++ b/tutorials/explicit.ipynb @@ -17,22 +17,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -137,15 +122,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (transpose)" ] }, "execution_count": 5, @@ -375,9 +365,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.12.1" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/tutorials/getting_started.ipynb b/tutorials/getting_started.ipynb index 31f3c13b11..4405c28d56 100644 --- a/tutorials/getting_started.ipynb +++ b/tutorials/getting_started.ipynb @@ -19,22 +19,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -81,8 +66,8 @@ { "data": { "text/plain": [ - "array([[0.19830156, 0.1679383 , 0.19932212],\n", - " [0.59336771, 0.20975676, 0.05706468]])" + "array([[0.74867876, 0.85403223, 0.16573784],\n", + " [0.71994615, 0.29855314, 0.21483992]])" ] }, "execution_count": 3, @@ -104,8 +89,8 @@ { "data": { "text/plain": [ - "array([[0.39660312, 0.33587661, 0.39864423],\n", - " [1.18673541, 0.41951352, 0.11412936]])" + "array([[1.49735752, 1.70806445, 0.33147568],\n", + " [1.4398923 , 0.59710627, 0.42967985]])" ] }, "execution_count": 4, @@ -135,15 +120,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (getstarted)" ] }, "execution_count": 5, @@ -218,15 +208,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (getstarted_sym)" ] }, "execution_count": 8, @@ -253,19 +248,19 @@ { "data": { "text/plain": [ - "array([[0.22917578, 0.2371489 , 1.41801157, ..., 0.65790524, 0.95110319,\n", - " 0.17970065],\n", - " [0.38880002, 1.76962412, 0.10092406, ..., 0.01563938, 1.59546665,\n", - " 0.91307168],\n", - " [0.65812086, 0.41412414, 1.53311494, ..., 0.34473083, 1.71308857,\n", - " 0.46120345],\n", + "array([[1.63216549, 1.26522381, 0.21606686, ..., 0.56988572, 1.12572538,\n", + " 1.72701877],\n", + " [0.3829452 , 1.52386969, 0.82165197, ..., 1.3105662 , 1.19336786,\n", + " 1.43671993],\n", + " [1.55277426, 1.50918516, 1.30665626, ..., 1.06562809, 1.53069088,\n", + " 1.10071159],\n", " ...,\n", - " [1.65819208, 0.38832393, 0.539072 , ..., 1.00576714, 0.84533283,\n", - " 0.93827821],\n", - " [1.39887643, 1.50380279, 1.85950996, ..., 0.48506318, 1.51421076,\n", - " 1.84443427],\n", - " [1.81472469, 1.50510688, 1.69746795, ..., 0.34524469, 0.63041897,\n", - " 0.76394633]])" + " [0.60629736, 1.73240929, 1.26797782, ..., 1.72034476, 1.56691557,\n", + " 0.22283613],\n", + " [1.96245486, 1.60559508, 0.02009914, ..., 1.40944583, 1.44560312,\n", + " 0.37804927],\n", + " [1.17875002, 0.96963921, 0.28278902, ..., 1.56747976, 0.4616313 ,\n", + " 0.94999278]])" ] }, "execution_count": 9, @@ -288,7 +283,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -304,7 +299,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -320,7 +315,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -329,14 +324,14 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "14.2 ms ± 465 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" + "12 ms ± 143 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" ] } ], @@ -346,14 +341,14 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "8.6 ms ± 44.6 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" + "3.86 ms ± 271 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n" ] } ], @@ -372,25 +367,30 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (sse_sigma)" ] }, - "execution_count": 15, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -436,7 +436,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.7" + "version": "3.12.1" } }, "nbformat": 4, diff --git a/tutorials/numpy_frontend.ipynb b/tutorials/numpy_frontend.ipynb index 8e83f0a204..fafda2f1b1 100644 --- a/tutorials/numpy_frontend.ipynb +++ b/tutorials/numpy_frontend.ipynb @@ -24,22 +24,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -121,15 +106,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (gemm)" ] }, "execution_count": 5, @@ -276,15 +266,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (forloop)" ] }, "execution_count": 10, @@ -332,15 +327,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (maptest)" ] }, "execution_count": 11, @@ -475,9 +475,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.7" + "version": "3.12.1" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/tutorials/sdfg_api.ipynb b/tutorials/sdfg_api.ipynb index 586115d85c..645158ce88 100644 --- a/tutorials/sdfg_api.ipynb +++ b/tutorials/sdfg_api.ipynb @@ -19,22 +19,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -126,15 +111,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 5, @@ -209,15 +199,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 7, @@ -244,15 +239,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 8, @@ -286,15 +286,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 9, @@ -341,15 +346,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 11, @@ -384,15 +394,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (jacobi2d)" ] }, "execution_count": 12, @@ -464,16 +479,7 @@ "cell_type": "code", "execution_count": 14, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING: Casting scalar argument \"N\" from int to \n", - "WARNING: Casting scalar argument \"T\" from int to \n" - ] - } - ], + "outputs": [], "source": [ "sdfg(A=inp, N=N, T=T)" ] @@ -487,7 +493,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Difference: 6.037729e-07\n" + "Difference: 1.6358224e-06\n" ] } ], @@ -512,9 +518,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.3" + "version": "3.12.1" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/tutorials/transformations.ipynb b/tutorials/transformations.ipynb index 511e8b1be3..d54b294e6e 100644 --- a/tutorials/transformations.ipynb +++ b/tutorials/transformations.ipynb @@ -31,22 +31,7 @@ { "data": { "text/html": [ - "\n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "\n" ], "text/plain": [ "" @@ -84,15 +69,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 2, @@ -121,15 +111,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 3, @@ -159,15 +154,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 4, @@ -196,15 +196,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 5, @@ -237,8 +242,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Match: MapTiling in _Mult__map: ['__i0', '__i1']\n", - "Match: MapTiling in _Add__map: ['__i0', '__i1']\n" + "Match: MapTiling in [MapEntry (_Mult__map[__i0=0:1000, __i1=0:1000])]\n", + "Match: MapTiling in [MapEntry (_Add__map[__i0=0:1000, __i1=0:1000])]\n" ] } ], @@ -275,7 +280,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Match found in state assign_4_4 . Nodes: [MapExit (_Mult__map[__i0=0:1000, __i1=0:1000]), AccessNode (__tmp1), MapEntry (_Add__map[__i0=0:1000, __i1=0:1000])]\n" + "Match found in state BinOp_5 . Nodes: [MapExit (_Mult__map[__i0=0:1000, __i1=0:1000]), AccessNode (__tmp0), MapEntry (_Add__map[__i0=0:1000, __i1=0:1000])]\n" ] } ], @@ -310,7 +315,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "_Mult__map[__i0=0:1000, __i1=0:1000] -> __tmp1 -> _Add__map[__i0=0:1000, __i1=0:1000]\n" + "_Mult__map[__i0=0:1000, __i1=0:1000] -> __tmp0 -> _Add__map[__i0=0:1000, __i1=0:1000]\n" ] } ], @@ -342,15 +347,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", "\n", + "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 9, @@ -388,15 +398,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 10, @@ -434,59 +449,132 @@ "name": "stdout", "output_type": "stream", "text": [ - "0. Transformation FPGATransformSDFG in dbladd\n", - "1. Transformation FPGATransformState in assign_4_4\n", - "2. Transformation GPUTransformLocalStorage in outer_fused[__i0=0:1000, __i1=0:1000]\n", - "3. Transformation GPUTransformMap in outer_fused[__i0=0:1000, __i1=0:1000]\n", - "4. Transformation GPUTransformSDFG in dbladd\n", - "5. Transformation MapExpansion in outer_fused: ['__i0', '__i1']\n", - "6. Transformation MapFission in outer_fused\n", - "7. Transformation MapTiling in outer_fused: ['__i0', '__i1']\n", - "8. Transformation NestSDFG in dbladd\n", - "9. Transformation StripMining in outer_fused: ['__i0', '__i1']\n", - "10. Transformation Vectorization in 6 -> 3 -> 7\n", - "Select the pattern to apply (0 - 10 or name$id): 7(tile_sizes=(128,))\n", - "You selected (7) pattern MapTiling in outer_fused: ['__i0', '__i1'] with parameters {'tile_sizes': (128,)}\n", - "0. Transformation FPGATransformSDFG in dbladd\n", - "1. Transformation FPGATransformState in assign_4_4\n", - "2. Transformation GPUTransformLocalStorage in outer_fused[__i0=128*tile___i0:Min(1000, 128*tile___i0 + 128), __i1=128*tile___i1:Min(1000, 128*tile___i1 + 128)]\n", - "3. Transformation GPUTransformLocalStorage in merged_tile___i0_outer_fused[tile___i0=0:int_ceil(1000, 128), tile___i1=0:int_ceil(1000, 128)]\n", - "4. Transformation GPUTransformMap in outer_fused[__i0=128*tile___i0:Min(1000, 128*tile___i0 + 128), __i1=128*tile___i1:Min(1000, 128*tile___i1 + 128)]\n", - "5. Transformation GPUTransformMap in merged_tile___i0_outer_fused[tile___i0=0:int_ceil(1000, 128), tile___i1=0:int_ceil(1000, 128)]\n", - "6. Transformation GPUTransformSDFG in dbladd\n", - "7. Transformation InLocalStorage in 8 -> 6\n", - "8. Transformation MapExpansion in outer_fused: ['__i0', '__i1']\n", - "9. Transformation MapExpansion in merged_tile___i0_outer_fused: ['tile___i0', 'tile___i1']\n", - "10. Transformation MapFission in outer_fused\n", - "11. Transformation MapTiling in outer_fused: ['__i0', '__i1']\n", - "12. Transformation MapTiling in merged_tile___i0_outer_fused: ['tile___i0', 'tile___i1']\n", - "13. Transformation NestSDFG in dbladd\n", - "14. Transformation OutLocalStorage in 7 -> 9\n", + "0. Transformation ElementWiseArrayOperation in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "1. Transformation ElementWiseArrayOperation2D in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "2. Transformation FPGATransformSDFG in []\n", + "3. Transformation FPGATransformState in [SDFGState (BinOp_5)]\n", + "4. Transformation GPUTransformLocalStorage in outer_fused[__i0=0:1000, __i1=0:1000]\n", + "5. Transformation GPUTransformMap in outer_fused[__i0=0:1000, __i1=0:1000]\n", + "6. Transformation GPUTransformSDFG in []\n", + "7. Transformation MapDimShuffle in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "8. Transformation MapExpansion in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "9. Transformation MapFission in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "10. Transformation MapTiling in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "11. Transformation MapTilingWithOverlap in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "12. Transformation MapUnroll in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", + "13. Transformation NestSDFG in []\n", + "14. Transformation ReductionNOperation in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])]\n", "15. Transformation StripMining in outer_fused: ['__i0', '__i1']\n", - "16. Transformation StripMining in merged_tile___i0_outer_fused: ['tile___i0', 'tile___i1']\n", - "17. Transformation Vectorization in 6 -> 3 -> 7\n", - "Select the pattern to apply (0 - 17 or name$id): \n", - "You did not select a valid option. Quitting optimization ...\n" + "16. Transformation TaskletFusion in [Tasklet (_Mult_), AccessNode (__tmp0), Tasklet (_Add_)]\n" ] }, { - "data": { - "text/html": [ - "\n", - "
\n", - "" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" + "name": "stdin", + "output_type": "stream", + "text": [ + "Select the pattern to apply (0 - 16 or name$id): MapExpansion$0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You selected (MapExpansion$0) pattern MapExpansion in [MapEntry (outer_fused[__i0=0:1000, __i1=0:1000])] with parameters {}\n", + "0. Transformation ElementWiseArrayOperation in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "1. Transformation FPGATransformSDFG in []\n", + "2. Transformation FPGATransformState in [SDFGState (BinOp_5)]\n", + "3. Transformation GPUGridStridedTiling in [MapEntry (outer_fused[__i0=0:1000]), MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "4. Transformation GPUTransformLocalStorage in outer_fused[__i0=0:1000]\n", + "5. Transformation GPUTransformMap in outer_fused[__i0=0:1000]\n", + "6. Transformation GPUTransformMap in outer_fused___i1[__i1=0:1000]\n", + "7. Transformation GPUTransformSDFG in []\n", + "8. Transformation InLocalStorage in outer_fused[__i0=0:1000] -> outer_fused___i1[__i1=0:1000]\n", + "9. Transformation MPITransformMap in [MapEntry (outer_fused[__i0=0:1000])]\n", + "10. Transformation MPITransformMap in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "11. Transformation MapDimShuffle in [MapEntry (outer_fused[__i0=0:1000])]\n", + "12. Transformation MapDimShuffle in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "13. Transformation MapFission in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "14. Transformation MapInterchange in [MapEntry (outer_fused[__i0=0:1000]), MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "15. Transformation MapTiling in [MapEntry (outer_fused[__i0=0:1000])]\n", + "16. Transformation MapTiling in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "17. Transformation MapTilingWithOverlap in [MapEntry (outer_fused[__i0=0:1000])]\n", + "18. Transformation MapTilingWithOverlap in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "19. Transformation MapToForLoop in [MapEntry (outer_fused[__i0=0:1000])]\n", + "20. Transformation MapToForLoop in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "21. Transformation MapUnroll in [MapEntry (outer_fused[__i0=0:1000])]\n", + "22. Transformation NestSDFG in []\n", + "23. Transformation OutLocalStorage in outer_fused___i1[__i1=0:1000] -> outer_fused[__i0=0:1000]\n", + "24. Transformation ReductionNOperation in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "25. Transformation StripMining in outer_fused: ['__i0']\n", + "26. Transformation StripMining in outer_fused___i1: ['__i1']\n", + "27. Transformation TaskletFusion in [Tasklet (_Mult_), AccessNode (__tmp0), Tasklet (_Add_)]\n" + ] + }, + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Select the pattern to apply (0 - 27 or name$id): MapTiling$0(tile_sizes=(128,))\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You selected (MapTiling$0) pattern MapTiling in [MapEntry (outer_fused[__i0=0:1000])] with parameters {'tile_sizes': (128,)}\n", + "0. Transformation ElementWiseArrayOperation in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "1. Transformation FPGATransformSDFG in []\n", + "2. Transformation FPGATransformState in [SDFGState (BinOp_5)]\n", + "3. Transformation GPUGridStridedTiling in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1]), MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "4. Transformation GPUGridStridedTiling in [MapEntry (outer_fused[tile___i0=0:1000:128]), MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "5. Transformation GPUTransformLocalStorage in outer_fused[tile___i0=0:1000:128]\n", + "6. Transformation GPUTransformMap in outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1]\n", + "7. Transformation GPUTransformMap in outer_fused___i1[__i1=0:1000]\n", + "8. Transformation GPUTransformMap in outer_fused[tile___i0=0:1000:128]\n", + "9. Transformation GPUTransformSDFG in []\n", + "10. Transformation InLocalStorage in outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1] -> outer_fused___i1[__i1=0:1000]\n", + "11. Transformation InLocalStorage in outer_fused[tile___i0=0:1000:128] -> outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1]\n", + "12. Transformation MPITransformMap in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "13. Transformation MPITransformMap in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "14. Transformation MPITransformMap in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "15. Transformation MapDimShuffle in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "16. Transformation MapDimShuffle in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "17. Transformation MapDimShuffle in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "18. Transformation MapFission in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "19. Transformation MapInterchange in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1]), MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "20. Transformation MapTiling in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "21. Transformation MapTiling in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "22. Transformation MapTiling in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "23. Transformation MapTilingWithOverlap in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "24. Transformation MapTilingWithOverlap in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "25. Transformation MapTilingWithOverlap in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "26. Transformation MapToForLoop in [MapEntry (outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1])]\n", + "27. Transformation MapToForLoop in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "28. Transformation MapToForLoop in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "29. Transformation MapUnroll in [MapEntry (outer_fused[tile___i0=0:1000:128])]\n", + "30. Transformation NestSDFG in []\n", + "31. Transformation OutLocalStorage in outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1] -> outer_fused[tile___i0=0:1000:128]\n", + "32. Transformation OutLocalStorage in outer_fused___i1[__i1=0:1000] -> outer_fused[__i0=tile___i0:Min(999, tile___i0 + 127) + 1]\n", + "33. Transformation ReductionNOperation in [MapEntry (outer_fused___i1[__i1=0:1000])]\n", + "34. Transformation StripMining in outer_fused: ['__i0']\n", + "35. Transformation StripMining in outer_fused___i1: ['__i1']\n", + "36. Transformation StripMining in outer_fused: ['tile___i0']\n", + "37. Transformation TaskletFusion in [Tasklet (_Mult_), AccessNode (__tmp0), Tasklet (_Add_)]\n" + ] + }, + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Select the pattern to apply (0 - 37 or name$id): \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You did not select a valid option. Quitting optimization ...\n" + ] } ], "source": [ @@ -565,15 +653,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 12, @@ -721,15 +814,20 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", + "
\n", + "
\n", + "\n", "" ], "text/plain": [ - "" + "SDFG (dbladd)" ] }, "execution_count": 15, @@ -780,7 +878,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.12.1" } }, "nbformat": 4,