Mesh pipelines: a required object size answers as Metal's first compile, as the mesh stage's does
Metal's answers here depend on what its compiler compiled before, which it keeps across processes
keyed on the function's AIR. With the probe's salt now in the AIR (d49370d732), an M3 Max under
macOS 27.0.1 answered, twice over, each sequence one fresh salt (m3-max-13430):
- required-object-32-max-64: refused on a first compile ("Kernel specified max total threads per
threadgroup (32) must match compute pipeline specified max total threads per threadgroup (64)"),
refused again, and again after required-object-32x2 or plain; made only after
required-object-64-max-64. required-mesh-32-max-64 the same, made only after
required-mesh-64-max-64. The object stage was made here because an earlier compile let it be.
- A required size gives its stage its threads on a first compile: required-object-32x2 answers an
object maximum of 64 (we answered 1024), required-mesh-16x2 a mesh maximum of 32, and a
required 32 beside a function's [[max_total_threads_per_threadgroup(64)]] 32 in either stage.
So the object stage now refuses a required size of other threads than its maximum
(MaxThreadsDiffer { stage: Object }), as the mesh stage already did, and each stage's thread
limit is the least of the descriptor's maximum, the function's, the required size's threads and
1024. RUNTIME behaviour: new_mesh_render_pipeline_state refuses an object maximum beside a
required object size of other threads, and maxTotalThreadsPer{Object,Mesh}Threadgroup answer a
required size's threads. The translator's mesh answers change, under the branch's
SEMANTICS_VERSION bump (2015).
Tests: engine_mesh's refusal test adds the object cases (32 and 16x2 under 64) and makes 64
under 64; its answers test checks a required size alone in each stage and below a function's
maximum; the runtime lane's mesh test does the same on a device. docs/API.md's accepted
difference, the error's and the getters' docs and the probe's measurements say the first-compile
rule and what later compiles answer.
(cherry picked from commit 3b05b274aec46c172fd0a38276c5ca45a1ade4ca)
This commit is contained in:
1 parent
532fa9ac1c
commit
85b896a7e1
8 files changed
+185
-94
No files matched your search
+9
-7
@@ -4926,13 +4926,15 @@ each item named states the rule in full.
|
||||
rest), and its creation refuses what Metal refuses of them (`MeshPipelineProblem`); a draw of
|
||||
other threadgroup sizes within the device's limits runs, and so does an object function's mesh
|
||||
grid past the state's maximum (within Metal's 2^20 above).
|
||||
- **A mesh state under a required threadgroup size or a function's own maximum follows one rule
|
||||
every time.** Its thread maxima are the descriptor's, else the function's, else 1024; a
|
||||
required mesh size of other threads than the mesh maximum is refused, and a required object
|
||||
size of fewer threads than the object maximum is made. An M3 Max under macOS 27.0.1 answers
|
||||
these from what its compiler compiled before: a first compile refused a required size of 32
|
||||
under a maximum of 64 in either stage and made it after a compile under 64, and a first compile
|
||||
of a function of `[[max_total_threads_per_threadgroup(64)]]` answered 32
|
||||
- **A mesh state under a required threadgroup size or a function's own maximum answers as
|
||||
Metal's first compile of its functions, every time.** Its thread maxima are the least of the
|
||||
descriptor's, the function's, the required size's threads and 1024, and a required size of
|
||||
other threads than its stage's maximum is refused in either stage. An M3 Max under macOS
|
||||
27.0.1 answers these from what its compiler compiled before, which it keeps across processes
|
||||
keyed on the function's AIR: a first compile refused a required size of 32 under a maximum of
|
||||
64 in either stage, and made it once the same function had compiled under that maximum and a
|
||||
required size of 64; after a compile under a required object size of 32 by 2, a plain state
|
||||
of the same functions answered an object maximum of 64, where a first compile answers 1024
|
||||
(`mesh_pipeline_limits.m`).
|
||||
|
||||
**Process exit**
|
||||
|
||||
Reference in new issue
Block a user