From a0b3e0423d514b93f03af02061e27bff7fd1bd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Tue, 12 Aug 2025 15:29:33 +0300 Subject: [PATCH 1/6] Minor tweaks to conditional copy --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 4baf51395b534..37fc4958f676a 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -253,7 +253,7 @@ If the *{spec_capability_name}* capability is declared: *OpName* or *OpMemberName* referencing the instruction are removed. ** The decoration itself is removed. -* If all 'Condition' operands of *{conditional_copy_name}* have been specialized to a known value, replace *{conditional_copy_name}* with *OpCopyObject* using the 'Operand' whose 'Condition' is *true*. +* If all 'Condition' operands of *{conditional_copy_name}* have been specialized to a known value, replace *{conditional_copy_name}* with *OpCopyObject* using the first 'Operand' whose 'Condition' is *true*. * If the module does not contain any decorations or instructions defined by this extension, any present *OpCapability {spec_capability_name}*, *OpCapability {fnvar_capability_name}* or *OpExtension {extension_name}* instructions are removed. @@ -494,7 +494,7 @@ Add to Section 3.56.9, Function Instructions: + Make a copy of 'Operand X' if 'Condition X' is *true*. - From all 'Condition X'-'Operand X' pairs, 'exactly' one 'Condition X' must be *true*. Consequently, at least one 'Condition X'-'Operand X' pair must be present. + From all 'Condition X'-'Operand X' pairs, at least one 'Condition X' must be *true*. Consequently, at least one 'Condition X'-'Operand X' pair must be present. Each 'Condition X' must be the result of a specialization constant of scalar 'Boolean' type. @@ -505,7 +505,7 @@ Add to Section 3.56.9, Function Instructions: 1+|Capability: + *{spec_capability_name}* -| 5 + variable | {conditional_copy_token} +| 3 + variable | {conditional_copy_token} | '' + 'Result Type' | 'Result ' From 90d7f1f4f0029e7d2a54e2fab2e6dc25dca55a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Tue, 12 Aug 2025 15:36:42 +0300 Subject: [PATCH 2/6] Change spec const capabilities word count to 3 --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 37fc4958f676a..43c0fe0e96a74 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -476,7 +476,7 @@ See *Specialization*. 1+|Capability: + *{fnvar_capability_name}* -| 4 + variable | {spec_const_capabilities_token} +| 3 + variable | {spec_const_capabilities_token} | '' + 'Result Type' | 'Result ' From ee5d9268871474a20f3d8e8b7042ed27d07b1e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Wed, 13 Aug 2025 12:00:05 +0300 Subject: [PATCH 3/6] Change last-modified date and msg --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 43c0fe0e96a74..56b7e649e6df5 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -60,8 +60,8 @@ Copyright (c) 2025 Intel Corporation. All rights reserved. [width="40%",cols="25,25"] |======================================== -| Last Modified Date | 2025-05-08 -| Revision | 0.11 +| Last Modified Date | 2025-08-13 +| Revision | 0.12 |======================================== @@ -762,4 +762,5 @@ Given the target `x86_64`, features `avx2,avx512f` and architecture `intel_cpu_s |0.9|2025-04-02|Jakub Žádník|Add conditional extension and specialization by capabilities |0.10|2025-04-22|Jakub Žádník|Added more precise wording regarding architecture comparisons |0.11|2025-05-08|Jakub Žádník|Misc corrections and clarifications +|0.12|2025-08-13|Jakub Žádník|Fix word counts to match consumer impl; Allow multiple true conditional copy conditions |======================================== From 677e72d3984e1d17718b0c05bedf5fa7819753f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Mon, 18 Aug 2025 10:08:39 +0300 Subject: [PATCH 4/6] Adjust validation rule --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 56b7e649e6df5..2d2d8fbc96d09 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -529,7 +529,7 @@ If the *{spec_capability_name}* capability is declared: . For *{conditional_entry_point_name}* and *{conditional_capability_name}*, the same validation rules apply as to their unconditional counterparts, with the exception that a module can contain multiple *{conditional_entry_point_name}* instructions with the same name and 'Execution Model'. . *{conditional_copy_name}*: -.. Exactly one 'Condition' must be *true*. +.. At least one 'Condition' must be *true*. .. The types of 'Operand' operands must not be *OpTypeVoid* and must match the 'Result Type'. .. All 'Condition X' operands must be results of specialization constant of a scalar 'Boolean type'. From 41ac3e04666955c2feedd4ab1e87654eab0b6183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Mon, 18 Aug 2025 15:26:15 +0300 Subject: [PATCH 5/6] Revert no. conditions to one --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 2d2d8fbc96d09..67d937bf4fe9d 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -253,7 +253,7 @@ If the *{spec_capability_name}* capability is declared: *OpName* or *OpMemberName* referencing the instruction are removed. ** The decoration itself is removed. -* If all 'Condition' operands of *{conditional_copy_name}* have been specialized to a known value, replace *{conditional_copy_name}* with *OpCopyObject* using the first 'Operand' whose 'Condition' is *true*. +* If all 'Condition' operands of *{conditional_copy_name}* have been specialized to a known value, replace *{conditional_copy_name}* with *OpCopyObject* using the 'Operand' whose 'Condition' is *true*. * If the module does not contain any decorations or instructions defined by this extension, any present *OpCapability {spec_capability_name}*, *OpCapability {fnvar_capability_name}* or *OpExtension {extension_name}* instructions are removed. @@ -494,7 +494,7 @@ Add to Section 3.56.9, Function Instructions: + Make a copy of 'Operand X' if 'Condition X' is *true*. - From all 'Condition X'-'Operand X' pairs, at least one 'Condition X' must be *true*. Consequently, at least one 'Condition X'-'Operand X' pair must be present. + From all 'Condition X'-'Operand X' pairs, exactly one 'Condition X' must be *true*. Consequently, at least one 'Condition X'-'Operand X' pair must be present. Each 'Condition X' must be the result of a specialization constant of scalar 'Boolean' type. @@ -529,7 +529,7 @@ If the *{spec_capability_name}* capability is declared: . For *{conditional_entry_point_name}* and *{conditional_capability_name}*, the same validation rules apply as to their unconditional counterparts, with the exception that a module can contain multiple *{conditional_entry_point_name}* instructions with the same name and 'Execution Model'. . *{conditional_copy_name}*: -.. At least one 'Condition' must be *true*. +.. Exactly one 'Condition X' operand must be *true*. .. The types of 'Operand' operands must not be *OpTypeVoid* and must match the 'Result Type'. .. All 'Condition X' operands must be results of specialization constant of a scalar 'Boolean type'. From 59963334dc2c9fbf8fa1087205503ff15ef442d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1dn=C3=ADk?= Date: Mon, 18 Aug 2025 15:28:05 +0300 Subject: [PATCH 6/6] Fix history --- .../spirv-extensions/SPV_INTEL_function_variants.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc index 67d937bf4fe9d..e3a06126bef1a 100644 --- a/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_function_variants.asciidoc @@ -762,5 +762,5 @@ Given the target `x86_64`, features `avx2,avx512f` and architecture `intel_cpu_s |0.9|2025-04-02|Jakub Žádník|Add conditional extension and specialization by capabilities |0.10|2025-04-22|Jakub Žádník|Added more precise wording regarding architecture comparisons |0.11|2025-05-08|Jakub Žádník|Misc corrections and clarifications -|0.12|2025-08-13|Jakub Žádník|Fix word counts to match consumer impl; Allow multiple true conditional copy conditions +|0.12|2025-08-13|Jakub Žádník|Fix word counts to match consumer impl |========================================