Skip to content

Commit 739d97d

Browse files
committed
Removed unused config options
1 parent aab9fae commit 739d97d

File tree

3 files changed

+4
-132
lines changed

3 files changed

+4
-132
lines changed

doc/library/config.rst

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,6 @@ import ``pytensor`` and print the config variable, as in:
103103

104104
String value: either ``'cpu'``
105105

106-
.. attribute:: force_device
107-
108-
Bool value: either ``True`` or ``False``
109-
110-
Default: ``False``
111-
112-
This flag's value cannot be modified during the program execution.
113-
114106
.. attribute:: print_active_device
115107

116108
Bool value: either ``True`` or ``False``
@@ -139,16 +131,6 @@ import ``pytensor`` and print the config variable, as in:
139131
equal to ``float64`` is created.
140132
This can be used to help find upcasts to ``float64`` in user code.
141133

142-
.. attribute:: deterministic
143-
144-
String value: either ``'default'``, ``'more'``
145-
146-
Default: ``'default'``
147-
148-
If ``more``, sometimes PyTensor will select :class:`Op` implementations that
149-
are more "deterministic", but slower. See the ``dnn.conv.algo*``
150-
flags for more cases.
151-
152134
.. attribute:: allow_gc
153135

154136
Bool value: either ``True`` or ``False``
@@ -412,16 +394,6 @@ import ``pytensor`` and print the config variable, as in:
412394
ignore it (i.e. ``'ignore'``).
413395
We suggest never using ``'ignore'`` except during testing.
414396

415-
.. attribute:: assert_no_cpu_op
416-
417-
String value: ``'ignore'`` or ``'warn'`` or ``'raise'`` or ``'pdb'``
418-
419-
Default: ``'ignore'``
420-
421-
If there is a CPU :class:`Op` in the computational graph, depending on its value,
422-
this flag can either raise a warning, an exception or drop into the frame
423-
with ``pdb``.
424-
425397
.. attribute:: on_shape_error
426398

427399
String value: ``'warn'`` or ``'raise'``
@@ -797,18 +769,3 @@ import ``pytensor`` and print the config variable, as in:
797769
The verbosity level of the meta-rewriter: ``0`` for silent, ``1`` to only
798770
warn when PyTensor cannot meta-rewrite an :class:`Op`, ``2`` for full output (e.g.
799771
timings and the rewrites selected).
800-
801-
802-
.. attribute:: config.metaopt__optimizer_excluding
803-
804-
Default: ``""``
805-
806-
A list of rewrite tags that we don't want included in the meta-rewriter.
807-
Multiple tags are separate by ``':'``.
808-
809-
.. attribute:: config.metaopt__optimizer_including
810-
811-
Default: ``""``
812-
813-
A list of rewriter tags to be included during meta-rewriting.
814-
Multiple tags are separate by ``':'``.

pytensor/configdefaults.py

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -260,29 +260,13 @@ def add_basic_configvars():
260260
),
261261
)
262262

263-
config.add(
264-
"deterministic",
265-
"If `more`, sometimes we will select some implementation that "
266-
"are more deterministic, but slower. Also see "
267-
"the dnn.conv.algo* flags to cover more cases.",
268-
EnumStr("default", ["more"]),
269-
in_c_key=False,
270-
)
271-
272263
config.add(
273264
"device",
274265
("Default device for computations. only cpu is supported for now"),
275266
DeviceParam("cpu", mutable=False),
276267
in_c_key=False,
277268
)
278269

279-
config.add(
280-
"force_device",
281-
"Raise an error if we can't use the specified device",
282-
BoolParam(False, mutable=False),
283-
in_c_key=False,
284-
)
285-
286270
config.add(
287271
"conv__assert_shape",
288272
"If True, AbstractConv* ops will verify that user-provided"
@@ -299,14 +283,6 @@ def add_basic_configvars():
299283
in_c_key=False,
300284
)
301285

302-
# This flag determines whether or not to raise error/warning message if
303-
# there is a CPU Op in the computational graph.
304-
config.add(
305-
"assert_no_cpu_op",
306-
"Raise an error/warning if there is a CPU op in the computational graph.",
307-
EnumStr("ignore", ["warn", "raise", "pdb"], mutable=True),
308-
in_c_key=False,
309-
)
310286
config.add(
311287
"unpickle_function",
312288
(
@@ -1043,20 +1019,6 @@ def add_metaopt_configvars():
10431019
in_c_key=False,
10441020
)
10451021

1046-
config.add(
1047-
"metaopt__optimizer_excluding",
1048-
("exclude optimizers with these tags. Separate tags with ':'."),
1049-
StrParam(""),
1050-
in_c_key=False,
1051-
)
1052-
1053-
config.add(
1054-
"metaopt__optimizer_including",
1055-
("include optimizers with these tags. Separate tags with ':'."),
1056-
StrParam(""),
1057-
in_c_key=False,
1058-
)
1059-
10601022

10611023
def add_vm_configvars():
10621024
config.add(
@@ -1295,55 +1257,6 @@ def add_caching_dir_configvars():
12951257
)
12961258

12971259

1298-
# Those are the options provided by PyTensor to choose algorithms at runtime.
1299-
SUPPORTED_DNN_CONV_ALGO_RUNTIME = (
1300-
"guess_once",
1301-
"guess_on_shape_change",
1302-
"time_once",
1303-
"time_on_shape_change",
1304-
)
1305-
1306-
# Those are the supported algorithm by PyTensor,
1307-
# The tests will reference those lists.
1308-
SUPPORTED_DNN_CONV_ALGO_FWD = (
1309-
"small",
1310-
"none",
1311-
"large",
1312-
"fft",
1313-
"fft_tiling",
1314-
"winograd",
1315-
"winograd_non_fused",
1316-
*SUPPORTED_DNN_CONV_ALGO_RUNTIME,
1317-
)
1318-
1319-
SUPPORTED_DNN_CONV_ALGO_BWD_DATA = (
1320-
"none",
1321-
"deterministic",
1322-
"fft",
1323-
"fft_tiling",
1324-
"winograd",
1325-
"winograd_non_fused",
1326-
*SUPPORTED_DNN_CONV_ALGO_RUNTIME,
1327-
)
1328-
1329-
SUPPORTED_DNN_CONV_ALGO_BWD_FILTER = (
1330-
"none",
1331-
"deterministic",
1332-
"fft",
1333-
"small",
1334-
"winograd_non_fused",
1335-
"fft_tiling",
1336-
*SUPPORTED_DNN_CONV_ALGO_RUNTIME,
1337-
)
1338-
1339-
SUPPORTED_DNN_CONV_PRECISION = (
1340-
"as_input_f32",
1341-
"as_input",
1342-
"float16",
1343-
"float32",
1344-
"float64",
1345-
)
1346-
13471260
# Eventually, the instance of `PyTensorConfigParser` should be created right here,
13481261
# where it is also populated with settings.
13491262
config = _create_default_config()

pytensor/configparser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class PyTensorConfigParser:
7575
pickle_test_value: bool
7676
cast_policy: str
7777
device: str
78+
conv__assert_shape: bool
7879
print_global_stats: bool
7980
unpickle_function: bool
8081
# add_compile_configvars
@@ -86,13 +87,15 @@ class PyTensorConfigParser:
8687
optimizer_verbose: bool
8788
on_opt_error: str
8889
nocleanup: bool
90+
on_unused_input: str
8991
gcc__cxxflags: str
9092
cmodule__warn_no_version: bool
9193
cmodule__remove_gxx_opt: bool
9294
cmodule__compilation_warning: bool
9395
cmodule__preload_cache: bool
9496
cmodule__age_thresh_use: int
9597
cmodule__debug: bool
98+
compile__wait: int
9699
compile__timeout: int
97100
# add_tensor_configvars
98101
tensor__cmp_sloppy: int
@@ -143,6 +146,7 @@ class PyTensorConfigParser:
143146
optdb__max_use_ratio: float
144147
cycle_detection: str
145148
check_stack_trace: str
149+
# add_metaopt_configvars
146150
metaopt__verbose: int
147151
# add_vm_configvars
148152
profile: bool
@@ -177,7 +181,6 @@ def __init__(
177181
self._pytensor_cfg = pytensor_cfg
178182
self._pytensor_raw_cfg = pytensor_raw_cfg
179183
self._config_var_dict: dict = {}
180-
super().__init__()
181184

182185
def __str__(self, print_doc=True):
183186
sio = StringIO()
@@ -375,7 +378,6 @@ def __init__(
375378
# more appropriate user-provided default value.
376379
# Calling `filter` here may actually be harmful if the default value is
377380
# invalid and causes a crash or has unwanted side effects.
378-
super().__init__()
379381

380382
@property
381383
def default(self):

0 commit comments

Comments
 (0)