Skip to content

Commit

Permalink
compiler: Patch factorizer pass after relaxing is_dense
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini authored and mloubout committed Aug 2, 2022
1 parent f8380b6 commit 693485f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-devito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
tag: 'nvidia-nvc'
flag: '--gpus all'
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
runner: ["self-hosted", "gpu", "docker"]
runner: ["self-hosted", "gpu", "docker", "v1004"]

- base: 'bases:nvidia-clang'
tag: 'nvidia-clang'
flag: '--gpus all'
test: 'tests/test_gpu_openmp.py tests/test_gpu_common.py'
runner: ["self-hosted", "gpu", "docker"]
runner: ["self-hosted", "gpu", "docker", "kimogila"]

# Runtime gpu flags from https://hub.docker.com/r/rocm/tensorflow/
- base: 'bases:amd'
Expand Down
4 changes: 2 additions & 2 deletions devito/passes/clusters/factorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from sympy import Add, Mul, S, collect

from devito.ir import cluster_pass
from devito.symbolics import estimate_cost, retrieve_symbols
from devito.symbolics import BasicWrapperMixin, estimate_cost, retrieve_symbols
from devito.tools import ReducerMap

__all__ = ['factorize']
Expand Down Expand Up @@ -115,7 +115,7 @@ def run(expr):
return expr, {'funcs': expr}
elif expr.is_Pow:
return expr, {'pows': expr}
elif expr.is_Symbol or expr.is_Indexed or expr.is_Atom:
elif expr.is_Symbol or expr.is_Indexed or isinstance(expr, BasicWrapperMixin):
return expr, {}
elif expr.is_Add:
args, candidates = zip(*[run(arg) for arg in expr.args])
Expand Down
3 changes: 2 additions & 1 deletion devito/symbolics/extended_sympy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
'FieldFromComposite', 'ListInitializer', 'Byref', 'IndexedPointer', 'Cast',
'DefFunction', 'InlineIf', 'Keyword', 'String', 'Macro', 'MacroArgument',
'CustomType', 'Deref', 'INT', 'FLOAT', 'DOUBLE', 'VOID', 'CEIL',
'FLOOR', 'MAX', 'MIN', 'Null', 'SizeOf', 'rfunc', 'cast_mapper']
'FLOOR', 'MAX', 'MIN', 'Null', 'SizeOf', 'rfunc', 'cast_mapper',
'BasicWrapperMixin']


class CondEq(sympy.Eq):
Expand Down

0 comments on commit 693485f

Please sign in to comment.