Skip to content
Snippets Groups Projects
Commit 098b3692 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Merge branch 'experiment/opt-build' into 'master'

Fixup previous fix on base storage sizes

See merge request !89
parents d10f57ae 0aa4edf0
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ from dune.perftool.loopy.vcl import get_vcl_type_size ...@@ -9,6 +9,7 @@ from dune.perftool.loopy.vcl import get_vcl_type_size
import loopy as lp import loopy as lp
import numpy as np import numpy as np
import pymbolic.primitives as prim import pymbolic.primitives as prim
import pytools as pt
def get_vector_view_name(tmpname): def get_vector_view_name(tmpname):
...@@ -37,8 +38,16 @@ def add_vector_view(knl, tmpname, pad_to=None): ...@@ -37,8 +38,16 @@ def add_vector_view(knl, tmpname, pad_to=None):
bsname = temp.base_storage bsname = temp.base_storage
# Determine the shape by dividing total size by vector size # Determine the shape by dividing total size by vector size
# Also apply the padding we need for rotation
# TODO: *Only* apply this padding if really needed (a bit hard to figure out)
vecsize = get_vcl_type_size(temp.dtype) vecsize = get_vcl_type_size(temp.dtype)
size = prim.FloorDiv(prim.Product(temp.shape), vecsize) if all(isinstance(s, int) for s in temp.shape):
size = pt.product(temp.shape) // vecsize
if size % vecsize != 0:
size = (size // vecsize + 1) * vecsize
else:
size = prim.FloorDiv(prim.Product(temp.shape), vecsize)
size = (size // vecsize + 1) * vecsize
# Maybe do some padding. # Maybe do some padding.
if pad_to: if pad_to:
......
loopy @ 87331320
Subproject commit c16057b7c361584d04edb59132f0742ecaa38226 Subproject commit 87331320981ca8f7419f32b48609e6dc465bbfff
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment