@@ -81,6 +81,48 @@ class LegateRuntimeSettings(Settings):
8181 """ ,
8282 )
8383
84+ min_gpu_chunk : EnvOnlySetting [int ] = EnvOnlySetting (
85+ "min_gpu_chunk" ,
86+ "LEGATE_MIN_GPU_CHUNK" ,
87+ default = 1048576 , # 1 << 20
88+ test_default = 2 ,
89+ convert = convert_int ,
90+ help = """
91+ If using GPUs, any task operating on arrays smaller than this will
92+ not be parallelized across more than one GPU.
93+
94+ This is a read-only environment variable setting used by the runtime.
95+ """ ,
96+ )
97+
98+ min_cpu_chunk : EnvOnlySetting [int ] = EnvOnlySetting (
99+ "min_cpu_chunk" ,
100+ "LEGATE_MIN_CPU_CHUNK" ,
101+ default = 16384 , # 1 << 14
102+ test_default = 2 ,
103+ convert = convert_int ,
104+ help = """
105+ If using CPUs, any task operating on arrays smaller than this will
106+ not be parallelized across more than one core.
107+
108+ This is a read-only environment variable setting used by the runtime.
109+ """ ,
110+ )
111+
112+ min_omp_chunk : EnvOnlySetting [int ] = EnvOnlySetting (
113+ "min_omp_chunk" ,
114+ "LEGATE_MIN_OMP_CHUNK" ,
115+ default = 131072 , # 1 << 17
116+ test_default = 2 ,
117+ convert = convert_int ,
118+ help = """
119+ If using OpenMP, any task operating on arrays smaller than this will
120+ not be parallelized across more than one OpenMP group.
121+
122+ This is a read-only environment variable setting used by the runtime.
123+ """ ,
124+ )
125+
84126 window_size : EnvOnlySetting [int ] = EnvOnlySetting (
85127 "window_size" ,
86128 "LEGATE_WINDOW_SIZE" ,
@@ -94,6 +136,43 @@ class LegateRuntimeSettings(Settings):
94136 """ ,
95137 )
96138
139+ max_pending_exceptions : EnvOnlySetting [int ] = EnvOnlySetting (
140+ "max_pending_exceptions" ,
141+ "LEGATE_MAX_PENDING_EXCEPTIONS" ,
142+ default = 64 ,
143+ test_default = 1 ,
144+ convert = convert_int ,
145+ help = """
146+ How many possibly-exception-throwing tasks to emit before blocking.
147+ Legate by default does not wait for operations to complete, but instead
148+ "runs ahead" and continues launching work, which will complete
149+ asynchronously. If an operation throws an exception, then by the time
150+ an exception is reported execution may have progressed beyond the
151+ launch of the faulting operation. If you need to check for an exception
152+ at the exact point where it might get thrown (e.g. to catch it and
153+ recover gracefully), set this to 1. Note that this will introduce more
154+ blocking in the control logic of your program, likely reducing overall
155+ utilization.
156+
157+ This is a read-only environment variable setting used by the runtime.
158+ """ ,
159+ )
160+
161+ precise_exception_trace : EnvOnlySetting [bool ] = EnvOnlySetting (
162+ "precise_exception_trace" ,
163+ "LEGATE_PRECISE_EXCEPTION_TRACE" ,
164+ default = False ,
165+ test_default = False ,
166+ convert = convert_bool ,
167+ help = """
168+ Whether to capture the stacktrace at the point when a potentially
169+ faulting operation is launched, so a more accurate error location can
170+ be reported in case an exception is thrown.
171+
172+ This is a read-only environment variable setting used by the runtime.
173+ """ ,
174+ )
175+
97176 field_reuse_frac : EnvOnlySetting [int ] = EnvOnlySetting (
98177 "field_reuse_frac" ,
99178 "LEGATE_FIELD_REUSE_FRAC" ,
@@ -125,6 +204,23 @@ class LegateRuntimeSettings(Settings):
125204 """ ,
126205 )
127206
207+ max_lru_length : EnvOnlySetting [int ] = EnvOnlySetting (
208+ "max_lru_length" ,
209+ "LEGATE_MAX_LRU_LENGTH" ,
210+ default = 5 ,
211+ test_default = 1 ,
212+ convert = convert_int ,
213+ help = """
214+ Once the last Store of a given shape is garbage collected, the
215+ resources associated with it are placed on an LRU queue, rather than
216+ getting freed immediately, in case the program creates a Store of the
217+ same shape in the near future. This setting controls the length of that
218+ LRU queue.
219+
220+ This is a read-only environment variable setting used by the runtime.
221+ """ ,
222+ )
223+
128224 disable_mpi : EnvOnlySetting [bool ] = EnvOnlySetting (
129225 "disable_mpi" ,
130226 "LEGATE_DISABLE_MPI" ,
0 commit comments