Skip to content

Propagator options

Dataclass-based option blocks that configure the various PropTorch / PropJax execution paths. Pass them through backend_options=, eager_options=, cuda_options= on the propagator constructor, or use the top-level kwargs that mirror the dataclass fields.

Eager (impl='eager')

sweep.propagator.options.EagerOptions

EagerOptions(
    use_compile: bool = True,
    compile_mode: str = "default",
    compile_dynamic: bool = False,
    compile_backend: str | None = None,
    compile_fullgraph: bool = False,
    store_last_wavefield: bool = False,
)

EagerOptions(use_compile: bool = True, compile_mode: str = 'default', compile_dynamic: bool = False, compile_backend: str | None = None, compile_fullgraph: bool = False, store_last_wavefield: bool = False)

compile_dynamic class-attribute

compile_dynamic = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

compile_fullgraph class-attribute

compile_fullgraph = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

compile_mode class-attribute

compile_mode = 'default'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

store_last_wavefield class-attribute

store_last_wavefield = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

use_compile class-attribute

use_compile = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

Compiled CUDA / C++ (impl='c')

sweep.propagator.options.CUDAOptions

CUDAOptions(memory: MemoryOptions | None = None)

CUDAOptions(memory: sweep.propagator.options.MemoryOptions | None = None)

sweep.propagator.options.MemoryOptions

MemoryOptions(
    strategy: Optional[Literal["boundary", "ckpt"]] = None,
    boundary: BoundaryOptions | None = None,
    ckpt: CkptOptions | None = None,
)

MemoryOptions(strategy: Optional[Literal['boundary', 'ckpt']] = None, boundary: sweep.propagator.options.BoundaryOptions | None = None, ckpt: sweep.propagator.options.CkptOptions | None = None)

sweep.propagator.options.BoundaryOptions

BoundaryOptions(
    storage: Literal["gpu", "cpu", "disk"] = "gpu",
    transfer_interval: int | None = None,
    pinned_memory: bool | None = None,
    disk_dir: str | None = None,
    ring_buffers: int | None = None,
    disk_async_read: bool = False,
    storage_dtype: Literal["fp32", "fp16", "bf16", "int8"] = "fp32",
)

BoundaryOptions(storage: Literal['gpu', 'cpu', 'disk'] = 'gpu', transfer_interval: int | None = None, pinned_memory: bool | None = None, disk_dir: str | None = None, ring_buffers: int | None = None, disk_async_read: bool = False, storage_dtype: Literal['fp32', 'fp16', 'bf16', 'int8'] = 'fp32')

disk_async_read class-attribute

disk_async_read = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

storage class-attribute

storage = 'gpu'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

storage_dtype class-attribute

storage_dtype = 'fp32'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Checkpointing

sweep.propagator.options.CkptOptions

CkptOptions(
    mode: Literal["chunk", "recursive"] = "chunk",
    chunks: int = 100,
    count: int = 0,
    storage: Literal["gpu", "cpu"] = "gpu",
    pinned_memory: bool | None = None,
)

CkptOptions(mode: Literal['chunk', 'recursive'] = 'chunk', chunks: int = 100, count: int = 0, storage: Literal['gpu', 'cpu'] = 'gpu', pinned_memory: bool | None = None)

chunks class-attribute

chunks = 100

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

count class-attribute

count = 0

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

mode class-attribute

mode = 'chunk'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

storage class-attribute

storage = 'gpu'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

Defaults

sweep.propagator.options.PropagatorDefaults

PropagatorDefaults(
    abcn: int = 50,
    free_surface: bool = False,
    dh: float = 10.0,
    dt: float = 0.002,
    dev: str | None = None,
    use_ckpt: bool = True,
    nt: int = -1,
    batch_size: int = 1,
    allow_growth: bool = True,
    full_mode: str = "full",
)

PropagatorDefaults(abcn: int = 50, free_surface: bool = False, dh: float = 10.0, dt: float = 0.002, dev: str | None = None, use_ckpt: bool = True, nt: int = -1, batch_size: int = 1, allow_growth: bool = True, full_mode: str = 'full')

abcn class-attribute

abcn = 50

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

allow_growth class-attribute

allow_growth = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

batch_size class-attribute

batch_size = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

dh class-attribute

dh = 10.0

Convert a string or number to a floating point number, if possible.

dt class-attribute

dt = 0.002

Convert a string or number to a floating point number, if possible.

free_surface class-attribute

free_surface = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

full_mode class-attribute

full_mode = 'full'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

nt class-attribute

nt = -1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

use_ckpt class-attribute

use_ckpt = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

sweep.propagator.options.EagerDefaults

EagerDefaults(
    use_compile: bool = True,
    compile_mode: str = "default",
    compile_dynamic: bool = False,
    compile_backend: str | None = None,
    compile_fullgraph: bool = False,
    store_last_wavefield: bool = False,
)

EagerDefaults(use_compile: bool = True, compile_mode: str = 'default', compile_dynamic: bool = False, compile_backend: str | None = None, compile_fullgraph: bool = False, store_last_wavefield: bool = False)

compile_dynamic class-attribute

compile_dynamic = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

compile_fullgraph class-attribute

compile_fullgraph = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

compile_mode class-attribute

compile_mode = 'default'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

store_last_wavefield class-attribute

store_last_wavefield = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

use_compile class-attribute

use_compile = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

sweep.propagator.options.CkptDefaults

CkptDefaults(
    mode: Literal["chunk", "recursive"] = "chunk",
    chunks: int = 100,
    count: int = 0,
    storage: Literal["gpu", "cpu"] = "gpu",
    pinned_memory: bool | None = None,
    cpu_pinned_memory: bool = True,
)

CkptDefaults(mode: Literal['chunk', 'recursive'] = 'chunk', chunks: int = 100, count: int = 0, storage: Literal['gpu', 'cpu'] = 'gpu', pinned_memory: bool | None = None, cpu_pinned_memory: bool = True)

chunks class-attribute

chunks = 100

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

count class-attribute

count = 0

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

cpu_pinned_memory class-attribute

cpu_pinned_memory = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

mode class-attribute

mode = 'chunk'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

storage class-attribute

storage = 'gpu'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

sweep.propagator.options.BoundaryDefaults

BoundaryDefaults(
    enabled: bool = False,
    storage: Literal["gpu", "cpu", "disk"] = "gpu",
    transfer_interval: int | None = None,
    pinned_memory: bool | None = None,
    disk_dir: str | None = None,
    ring_buffers: int | None = None,
    disk_async_read: bool = False,
    gpu_transfer_interval: int = 1,
    gpu_pinned_memory: bool = False,
    gpu_ring_buffers: int = 1,
    cpu_transfer_interval: int = 64,
    cpu_ring_buffers: int = 1,
    cpu_pinned_memory: bool = True,
    disk_transfer_interval: int = 32,
    disk_async_transfer_interval_2d: int = 40,
    disk_async_transfer_interval_3d: int = 16,
    disk_ring_buffers_2d: int = 3,
    disk_ring_buffers_3d: int = 2,
    disk_async_ring_buffers: int = 2,
)

BoundaryDefaults(enabled: bool = False, storage: Literal['gpu', 'cpu', 'disk'] = 'gpu', transfer_interval: int | None = None, pinned_memory: bool | None = None, disk_dir: str | None = None, ring_buffers: int | None = None, disk_async_read: bool = False, gpu_transfer_interval: int = 1, gpu_pinned_memory: bool = False, gpu_ring_buffers: int = 1, cpu_transfer_interval: int = 64, cpu_ring_buffers: int = 1, cpu_pinned_memory: bool = True, disk_transfer_interval: int = 32, disk_async_transfer_interval_2d: int = 40, disk_async_transfer_interval_3d: int = 16, disk_ring_buffers_2d: int = 3, disk_ring_buffers_3d: int = 2, disk_async_ring_buffers: int = 2)

cpu_pinned_memory class-attribute

cpu_pinned_memory = True

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

cpu_ring_buffers class-attribute

cpu_ring_buffers = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

cpu_transfer_interval class-attribute

cpu_transfer_interval = 64

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_async_read class-attribute

disk_async_read = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

disk_async_ring_buffers class-attribute

disk_async_ring_buffers = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_async_transfer_interval_2d class-attribute

disk_async_transfer_interval_2d = 40

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_async_transfer_interval_3d class-attribute

disk_async_transfer_interval_3d = 16

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_ring_buffers_2d class-attribute

disk_ring_buffers_2d = 3

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_ring_buffers_3d class-attribute

disk_ring_buffers_3d = 2

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

disk_transfer_interval class-attribute

disk_transfer_interval = 32

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

enabled class-attribute

enabled = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

gpu_pinned_memory class-attribute

gpu_pinned_memory = False

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

gpu_ring_buffers class-attribute

gpu_ring_buffers = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

gpu_transfer_interval class-attribute

gpu_transfer_interval = 1

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

storage class-attribute

storage = 'gpu'

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.