Skip to content

Commit 143c493

Browse files
committed
misc: Fix typos in Devito
1 parent e2740eb commit 143c493

46 files changed

Lines changed: 133 additions & 114 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Focus on modeling and math — Devito handles the performance.
6464

6565

6666
## What Devito is not
67-
As is hopefully implied by the preceeding section, Devito is *not* a seismic modelling or imaging framework, nor is it a set of pre-baked solvers. Whilst Devito is often associated with seismic imaging, this is just one application domain. Our RTM and FWI examples use Devito under the hood, but the engine itself is physics-agnostic. There’s no built-in assumption about waves, seismics, or domains — you provide the physics, and Devito delivers efficient, architecture-aware implementations.
67+
As is hopefully implied by the preceding section, Devito is *not* a seismic modelling or imaging framework, nor is it a set of pre-baked solvers. Whilst Devito is often associated with seismic imaging, this is just one application domain. Our RTM and FWI examples use Devito under the hood, but the engine itself is physics-agnostic. There’s no built-in assumption about waves, seismics, or domains — you provide the physics, and Devito delivers efficient, architecture-aware implementations.
6868

6969
Furthermore, the examples provided with Devito are often conflated with the core DSL and compiler. However, the purpose of this collection of tutorials, code samples, and helper functions is fourfold:
7070

benchmarks/user/advisor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We recommend going through tutorial [02_advisor_roofline.ipynb](https://github.c
77
* Support is guaranteed only for Intel oneAPI 2025; earlier versions may not work.
88
You may download Intel oneAPI [here](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?packages=oneapi-toolkit&oneapi-toolkit-os=linux&oneapi-lin=apt).
99

10-
* Add Advisor (advixe-cl) and compilers (icx) in the path. The right env variables should be sourced along the lines of (depending on your isntallation folder):
10+
* Add Advisor (advixe-cl) and compilers (icx) in the path. The right env variables should be sourced along the lines of (depending on your installation folder):
1111
```sh
1212
source /opt/intel/oneapi/advisor/latest/env/vars.sh
1313
source /opt/intel/oneapi/compiler/latest/env/vars.sh

conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ def assert_structure(operator, exp_trees=None, exp_iters=None):
370370
if exp_trees is not None:
371371
trees = retrieve_iteration_tree(operator)
372372
exp_trees = [i.replace(',', '') for i in exp_trees] # 't,x,y' -> 'txy'
373-
tree_struc = (["".join(mapper.get(i.dim.name, i.dim.name) for i in j)
373+
tree_struct = (["".join(mapper.get(i.dim.name, i.dim.name) for i in j)
374374
for j in trees]) # Flatten every tree's dims as a string
375-
assert tree_struc == exp_trees
375+
assert tree_struct == exp_trees
376376

377377
if exp_iters is not None:
378378
iters = FindNodes(Iteration).visit(operator)
379379
exp_iters = exp_iters.replace(',', '') # 't,x,y' -> 'txy'
380-
iter_struc = "".join(mapper.get(i.dim.name, i.dim.name) for i in iters)
381-
assert iter_struc == exp_iters
380+
iter_struct = "".join(mapper.get(i.dim.name, i.dim.name) for i in iters)
381+
assert iter_struct == exp_iters
382382

383383

384384
def assert_blocking(operator, exp_nests):

devito/arch/compiler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,14 +1027,14 @@ def __init_finalize__(self, **kwargs):
10271027
self._base.__init_finalize__(self, **kwargs)
10281028
# Update cflags
10291029
try:
1030-
extrac = environ.get('CFLAGS').split(' ')
1031-
self.cflags = self.cflags + extrac
1030+
extra_c = environ.get('CFLAGS').split(' ')
1031+
self.cflags = self.cflags + extra_c
10321032
except AttributeError:
10331033
pass
10341034
# Update ldflags
10351035
try:
1036-
extrald = environ.get('LDFLAGS').split(' ')
1037-
self.ldflags = self.ldflags + extrald
1036+
extra_ld = environ.get('LDFLAGS').split(' ')
1037+
self.ldflags = self.ldflags + extra_ld
10381038
except AttributeError:
10391039
pass
10401040

devito/builtins/initializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def initialize_function(function, data, nbl, mapper=None, mode='constant',
348348
[2, 3, 3, 3, 3, 2],
349349
[2, 2, 2, 2, 2, 2]], dtype=int32)
350350
"""
351+
# TODO: fix the horrendous use of pluralisation in this function !!!
351352
if isinstance(function, (list, tuple)):
352353
if not isinstance(data, (list, tuple)):
353354
raise TypeError("Expected a list of `data`")

devito/builtins/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def pad_outhalo(function):
109109
function._data_with_outhalo._local[tuple(slices)] \
110110
= function._data_with_outhalo._local[tuple(slices_d)]
111111
if h.left == 0 and h.right == 0:
112-
# Need to access it so that that worker is not blocking exectution since
112+
# Need to access it so that that worker is not blocking execution since
113113
# _data_with_outhalo requires communication
114114
function._data_with_outhalo._local[0] = function._data_with_outhalo._local[0]
115115

devito/checkpointing/checkpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class DevitoCheckpoint(Checkpoint):
5151
pyRevolve. Holds a list of symbol objects that hold data.
5252
"""
5353
def __init__(self, objects):
54-
"""Intialise a checkpoint object. Upon initialisation, a checkpoint
54+
"""Initialise a checkpoint object. Upon initialisation, a checkpoint
5555
stores only a reference to the objects that are passed into it."""
5656
assert(all(isinstance(o, TimeFunction) for o in objects))
5757
dtypes = set([o.dtype for o in objects])
@@ -92,7 +92,7 @@ def get_symbol_data(symbol, timestep):
9292
# Use `._data`, instead of `.data`, as `.data` is a view of the DOMAIN
9393
# data region which is non-contiguous in memory. The performance hit from
9494
# dealing with non-contiguous memory is so big (introduces >1 copy), it's
95-
# better to checkpoint unneccesarry stuff to get a contiguous chunk of memory.
95+
# better to checkpoint unnecessary stuff to get a contiguous chunk of memory.
9696
ptr = symbol._data[timestep - i, :, :]
9797
ptrs.append(ptr)
9898
return ptrs

devito/core/autotuning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def autotune(operator, args, level, mode):
141141
update_time_bounds(stepper, at_args, timesteps, mode)
142142
timer.reset()
143143

144-
# The best variant is the one that for a given number of threads had the minium
144+
# The best variant is the one that for a given number of threads had the minimum
145145
# turnaround time
146146
try:
147147
runs = 0

devito/core/operator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class BasicOperator(Operator):
7373
CIRE_MINMEM = True
7474
"""
7575
Minimize memory consumption when allocating temporaries for CIRE-optimized
76-
expressions. This may come at the cost of slighly worse performance due to
76+
expressions. This may come at the cost of slightly worse performance due to
7777
the potential need for extra registers to hold a greater number of support
7878
variables (e.g., strides).
7979
"""
@@ -91,7 +91,7 @@ class BasicOperator(Operator):
9191

9292
PAR_COLLAPSE_WORK = 100
9393
"""
94-
Use a collapse clause if the trip count of the collapsable loops is statically
94+
Use a collapse clause if the trip count of the collapsible loops is statically
9595
known to exceed this threshold.
9696
"""
9797

@@ -172,7 +172,7 @@ class BasicOperator(Operator):
172172

173173
@classmethod
174174
def _normalize_kwargs(cls, **kwargs):
175-
# Will be populated with dummy values; this method is actually overriden
175+
# Will be populated with dummy values; this method is actually overridden
176176
# by the subclasses
177177
o = {}
178178
oo = kwargs['options']

devito/data/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def __setitem__(self, glb_idx, val, comm_type):
337337
elif np.isscalar(val):
338338
if index_is_basic(loc_idx):
339339
# Won't go through `__getitem__` as it's basic indexing mode,
340-
# so we should just propage `loc_idx`
340+
# so we should just propagate `loc_idx`
341341
super().__setitem__(loc_idx, val)
342342
else:
343343
super().__setitem__(glb_idx, val)

0 commit comments

Comments
 (0)