-
Notifications
You must be signed in to change notification settings - Fork 238
compiler: Fix complex arguments and implement float16 lowering #2403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b28090
aa353b4
92dfd9a
4364524
470f4f5
7ffff0a
d1dd24e
4f43f26
6b4f12d
9abeea8
94d5571
ecadec3
27ff82a
066279d
7af930b
5b7efcc
a09350f
d4c9454
d3169d0
493c1e8
516b4ad
079facb
cc08bcd
f9c04ac
e519a9a
6725c9a
b57949a
ec98a02
6a2f8e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,12 @@ | |
from devito.passes import (Graph, lower_index_derivatives, generate_implicit, | ||
generate_macros, minimize_symbols, unevaluate, | ||
error_mapper, is_on_device) | ||
from devito.passes.iet.langbase import LangBB | ||
from devito.symbolics import estimate_cost, subs_op_args | ||
from devito.tools import (DAG, OrderedSet, Signer, ReducerMap, as_mapper, as_tuple, | ||
flatten, filter_sorted, frozendict, is_integer, | ||
split, timed_pass, timed_region, contains_val) | ||
from devito.tools.dtypes_lowering import ctypes_vector_mapper | ||
from devito.types import (Buffer, Grid, Evaluable, host_layer, device_layer, | ||
disk_layer) | ||
|
||
|
@@ -264,6 +266,9 @@ def _lower(cls, expressions, **kwargs): | |
# expression for which a partial or complete lowering is desired | ||
kwargs['rcompile'] = cls._rcompile_wrapper(**kwargs) | ||
|
||
# Load language-specific types into the global dtype->ctype mapper | ||
cls._load_dtype_mappings(**kwargs) | ||
|
||
# [Eq] -> [LoweredEq] | ||
expressions = cls._lower_exprs(expressions, **kwargs) | ||
|
||
|
@@ -285,6 +290,11 @@ def _lower(cls, expressions, **kwargs): | |
def _rcompile_wrapper(cls, **kwargs0): | ||
raise NotImplementedError | ||
|
||
@classmethod | ||
def _load_dtype_mappings(cls, **kwargs): | ||
lang: type[LangBB] = cls._Target.DataManager.lang | ||
ctypes_vector_mapper.update(lang.mapper.get('types', {})) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that's a bit tricky because this updates a global |
||
|
||
@classmethod | ||
def _initialize_state(cls, **kwargs): | ||
return {} | ||
|
@@ -469,6 +479,8 @@ def _lower_iet(cls, uiet, profiler=None, **kwargs): | |
|
||
# Lower IET to a target-specific IET | ||
graph = Graph(iet, **kwargs) | ||
|
||
# Specialize | ||
graph = cls._specialize_iet(graph, **kwargs) | ||
|
||
# Instrument the IET for C-level profiling | ||
|
@@ -1347,7 +1359,8 @@ def parse_kwargs(**kwargs): | |
raise InvalidOperator("Illegal `compiler=%s`" % str(compiler)) | ||
kwargs['compiler'] = compiler_registry[compiler](platform=kwargs['platform'], | ||
language=kwargs['language'], | ||
mpi=configuration['mpi']) | ||
mpi=configuration['mpi'], | ||
name=compiler) | ||
elif any([platform, language]): | ||
kwargs['compiler'] =\ | ||
configuration['compiler'].__new_with__(platform=kwargs['platform'], | ||
|
Uh oh!
There was an error while loading. Please reload this page.