Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Build Firedrake
run: |
cd ..
./firedrake/scripts/firedrake-install $COMPLEX --venv-name build --tinyasm --disable-ssh --minimal-petsc --slepc --documentation-dependencies --install thetis --install gusto --install icepack --install irksome --install femlium --no-package-manager|| (cat firedrake-install.log && /bin/false)
./firedrake/scripts/firedrake-install $COMPLEX --venv-name build --tinyasm --disable-ssh --minimal-petsc --slepc --documentation-dependencies --install thetis --install gusto --install icepack --install irksome --install femlium --no-package-manager --package-branch PyOP2 sv/fix-flop-count --package-branch loopy stats_c_instructions|| (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
run: |
. ../build/bin/activate
Expand All @@ -58,6 +58,7 @@ jobs:
. ../build/bin/activate
echo OMP_NUM_THREADS is $OMP_NUM_THREADS
echo OPENBLAS_NUM_THREADS is $OPENBLAS_NUM_THREADS
export PYOP2_COMPUTE_KERNEL_FLOPS=1
python -m pytest --durations=200 -n 12 --cov firedrake --timeout=1800 -v tests
- name: Test pyadjoint
if: ${{ matrix.scalar-type == 'real' }}
Expand Down
3 changes: 2 additions & 1 deletion firedrake/extrusion_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def _get_lp_domains(_inames, _extents):
raise NotImplementedError('Unsupported extrusion type "%s"' % extrusion_type)

ast = lp.make_function(domains, instructions, data, name=name, target=target,
seq_dependencies=True, silenced_warnings=["summing_if_branches_ops"])
seq_dependencies=True, silenced_warnings=["summing_if_branches_ops",
"insn_count_subgroups_upper_bound"])
kernel = op2.Kernel(ast, name)
op2.ParLoop(kernel,
ext_coords.cell_set,
Expand Down
3 changes: 2 additions & 1 deletion firedrake/parloops.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def _form_loopy_kernel(kernel_domains, instructions, measure, args, **kwargs):
except KeyError:
kargs.append(...)
knl = loopy.make_function(kernel_domains, instructions, kargs, name="par_loop_kernel", target=target,
seq_dependencies=True, silenced_warnings=["summing_if_branches_ops"])
seq_dependencies=True, silenced_warnings=["summing_if_branches_ops",
"insn_count_subgroups_upper_bound"])
knl = op2.Kernel(knl, "par_loop_kernel", **kwargs)
if kernel_cache is not None:
return kernel_cache.setdefault(key, knl)
Expand Down
3 changes: 2 additions & 1 deletion firedrake/slate/slac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ def merge_loopy(slate_loopy, output_arg, builder, var2terminal, name):
preamble = preamble_init+preamble if preamble else []
slate_wrapper = lp.make_function(domains, insns, loopy_args, name=name,
seq_dependencies=True, target=target,
lang_version=(2018, 2), preambles=preamble)
lang_version=(2018, 2), preambles=preamble,
silenced_warnings=["insn_count_subgroups_upper_bound"])

# Generate program from kernel, so that one can register kernels
from pyop2.codegen.loopycompat import _match_caller_callee_argument_dimension_
Expand Down
12 changes: 11 additions & 1 deletion tests/slate/test_local_logging.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import os


def test_slate_logging():
def test_slate_logging_flame():
"""This only checks that logging does not break Firedrake, it does not check for correctness."""
path = os.path.dirname(os.path.abspath(__file__))
pyop2_cache = os.environ['PYOP2_CACHE_DIR']
err = os.system(f'python {path}/script_logging.py -log_view :{pyop2_cache}/test.txt:ascii_flamegraph')
assert err == 0


def test_slate_logging_flops():
"""This only checks that flop counting does not break Firedrake, it does not check for correctness."""
path = os.path.dirname(os.path.abspath(__file__))
pyop2_cache = os.environ['PYOP2_CACHE_DIR']
os.system('export PYOP2_COMPUTE_KERNEL_FLOPS=1')
err = os.system(f'python {path}/script_logging.py -log_view :{pyop2_cache}/test.txt')
assert err == 0
os.system('export PYOP2_COMPUTE_KERNEL_FLOPS=0')