Skip to content

Commit c2f792a

Browse files
committed
Drop CA_(target)_ENABLED CMake options.
The CA_(target)_ENABLED options were provided because we simultaneously wanted to enable all available Mux targets by default, and disable the RISC-V Mux target by default. This is confusing when CA_RISCV_ENABLED and CA_MUX_TARGETS_TO_ENABLE are mismatched: it causes the RISC-V Mux target to be disabled when either variable disables it, even when the other variable suggests that it should be enabled. Drop CA_(target)_ENABLED and rely entirely on CA_MUX_TARGETS_TO_ENABLE instead. For consistency, make the same change to CA_MUX_COMPILERS_TO_ENABLE. For both CA_MUX_TARGETS_TO_ENABLE and CA_MUX_COMPILERS_TO_ENABLE, change the default to "host", and update the documentation and continuous integration to set them where we do not want host and were not already setting them.
1 parent a537ec9 commit c2f792a

File tree

16 files changed

+14
-55
lines changed

16 files changed

+14
-55
lines changed

.github/actions/do_build_ock/action.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ inputs:
5555
hal_refsi_thread_mode:
5656
description: 'HAL Refsi Thread Mode e.g. WI or WG, default ""'
5757
default: ""
58-
riscv_enabled:
59-
description: "Enable riscv target (default OFF)"
60-
default: OFF
6158
build_dir:
6259
description: "Directory to be used for building"
6360
default: build
@@ -155,7 +152,6 @@ runs:
155152
-DHAL_DESCRIPTION=${{ inputs.hal_description }}
156153
-DHAL_REFSI_SOC=${{ inputs.hal_refsi_soc }}
157154
-DHAL_REFSI_THREAD_MODE=${{ inputs.hal_refsi_thread_mode }}
158-
-DCA_RISCV_ENABLED=${{ inputs.riscv_enabled }}
159155
-DCA_CL_ENABLE_RVV_SCALABLE_VECZ_CHECK=${{ inputs.enable_rvv_scalable_vecz_check }}
160156
-DCA_CL_ENABLE_RVV_SCALABLE_VP_VECZ_CHECK=${{ inputs.enable_rvv_scalable_vp_vecz_check }}
161157
-DCA_CL_ENABLE_UNITCL_EXPENSIVE_CHECK=${{ inputs.enable_unitcl_expensive }}

.github/actions/do_build_ock/do_build_m1/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ runs:
2020
mux_targets_enable: riscv
2121
mux_compilers_enable: refsi_m1
2222
external_compiler_dirs: "${{ github.workspace }}/examples/refsi/refsi_m1/compiler/refsi_m1"
23-
riscv_enabled: ON
2423
enable_rvv_scalable_vecz_check: ON
2524
enable_rvv_scalable_vp_vecz_check: ON
2625
extra_flags: ${{ inputs.extra_flags }}

.github/workflows/run_pr_tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ jobs:
245245
build_targets: check-ock-UnitCL-group-vecz
246246
mux_targets_enable: riscv
247247
mux_compilers_enable: riscv
248-
riscv_enabled: ON
249248
enable_rvv_scalable_vecz_check: ON
250249
enable_rvv_scalable_vp_vecz_check: ON
251250
use_linker: gold
@@ -321,7 +320,6 @@ jobs:
321320
build_targets: check-ock
322321
mux_targets_enable: riscv
323322
mux_compilers_enable: riscv
324-
riscv_enabled: ON
325323
disable_unitcl_vecz_checks: ON
326324
enable_rvv_scalable_vecz_check: ON
327325
enable_rvv_scalable_vp_vecz_check: ON
@@ -441,7 +439,6 @@ jobs:
441439
mux_targets_enable: riscv
442440
external_compiler_dirs: ${{ github.workspace }}/examples/refsi/refsi_g1_wi/compiler/refsi_g1_wi
443441
mux_compilers_enable: refsi_g1_wi
444-
riscv_enabled: ON
445442
disable_unitcl_vecz_checks: ON
446443
enable_rvv_scalable_vecz_check: ON
447444
enable_rvv_scalable_vp_vecz_check: ON

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Upgrade guidance:
66

77
* Support for degenerate subgroups has been removed. No in-tree target or
88
template was using this, but custom targets may need to be updated.
9+
* Mux now enables only the "host" compiler and target by default. Non-host
10+
builds will need to specify the compiler and target explicitly. The
11+
`CA_(target)_ENABLED` variables which served as extra gates for various
12+
targets no longer have any effect.
913

1014
## Version 4.0.0
1115

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ endif()
112112
ca_option(CA_ENABLE_DOCUMENTATION BOOL
113113
"Enable documentation generation" ON)
114114
ca_option(CA_MUX_TARGETS_TO_ENABLE STRING
115-
"Semi-colon separated list of ComputeMux targets to enable, empty enables all" "")
115+
"Semi-colon separated list of ComputeMux targets to enable, empty enables all" "host")
116116
ca_option(CA_EXTERNAL_MUX_TARGET_DIRS STRING
117117
"Semi-colon separated list of external ComputeMux target source directories" "")
118118
ca_option(CA_MUX_COMPILERS_TO_ENABLE STRING
119-
"Semi-colon separated list of ComputeMux compilers to enable, empty enables all" "")
119+
"Semi-colon separated list of ComputeMux compilers to enable, empty enables all" "host")
120120
ca_option(CA_EXTERNAL_MUX_COMPILER_DIRS STRING
121121
"Semi-colon separated list of external ComputeMux compiler source directories" "")
122122
ca_immutable_option(CA_RUNTIME_COMPILER_ENABLED BOOL

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ The available targets in the current implementation are based on Codeplay's refe
7171
```sh
7272
cmake -GNinja \
7373
-Bbuild-riscv \
74-
-DCA_RISCV_ENABLED=ON \
7574
-DCA_MUX_TARGETS_TO_ENABLE="riscv" \
7675
-DCA_LLVM_INSTALL_DIR=$LLVMInstall \
7776
-DCA_ENABLE_HOST_IMAGE_SUPPORT=OFF \

doc/modules/mux/bumping-the-spec.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ Bumping the ComputeMux Specification Version
1111
a. Note that as long as the version number is in the 0.X.Y stage it is very
1212
unlikely that you will be updating the major number.
1313
3. Configure CMake, making sure that all ComputeMux targets are enabled. This
14-
includes ``host`` which is enabled by default, the ``stub`` target which is
15-
enabled with the ``CA_STUB_ENABLED``, and the RISC-V target which is enabled
16-
with the ``CA_RISCV_ENABLED`` cmake option.
14+
includes ``host`` which is enabled by default, and the ``stub`` and ``riscv``
15+
targets.
1716
4. Build the ``mux-api-generate`` target e.g., ``ninja mux-api-generate``.
1817
5. Update ``doc/modules/mux/changes.rst``. The previous step will have
1918
generated an empty entry for the latest version.

doc/modules/riscv.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Currently recommended build options include:
125125
.. code-block:: console
126126
127127
$ cmake -GNinja \
128-
-DCA_RISCV_ENABLED=ON \
129128
-DCA_MUX_TARGETS_TO_ENABLE="riscv" \
130129
-DCA_LLVM_INSTALL_DIR=<llvm_install_dir>/llvm_install \
131130
-DCA_ENABLE_HOST_IMAGE_SUPPORT=OFF \
@@ -138,7 +137,6 @@ target has additional features. This is done by adding to the build options:
138137
.. code-block:: console
139138
140139
$ cmake -GNinja \
141-
-DCA_RISCV_ENABLED=ON \
142140
-DCA_MUX_TARGETS_TO_ENABLE="riscv" \
143141
-DCA_LLVM_INSTALL_DIR=<llvm_install_dir>/llvm_install \
144142
-DCA_ENABLE_HOST_IMAGE_SUPPORT=OFF \

doc/overview/tutorials/creating-a-new-mux-target/building-and-running-tests.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Firstly we set up the `CMake` directive.
2929
$ export LLVM_INSTALL_DIR=<your_llvm_install_dir>
3030
$ export ONEAPI_CON_KIT_PATH=<your_oneapi_construction_kit_dir>
3131
$ cmake -GNinja -DCA_MUX_TARGETS_TO_ENABLE="refsi_tutorial" \
32-
-DCA_REFSI_TUTORIAL_ENABLED=ON -DCA_ENABLE_API=cl \
32+
-DCA_MUX_COMPILERS_TO_ENABLE="refsi_tutorial" \
33+
-DCA_ENABLE_API=cl \
3334
-DCMAKE_BUILD_TYPE=Debug \
3435
-DCA_LLVM_INSTALL_DIR=$LLVM_INSTALL_DIR \
3536
-DCA_ENABLE_DEBUG_SUPPORT=ON \
@@ -39,8 +40,8 @@ Firstly we set up the `CMake` directive.
3940
-DCA_EXTERNAL_REFSI_TUTORIAL_HAL_DIR=<path to target hal> \
4041
-Bbuild .
4142
42-
The ``CA_MUX_TARGETS_TO_ENABLE`` should match the ``target_name`` field from the
43-
`JSON` file.
43+
The ``CA_MUX_TARGETS_TO_ENABLE`` and ``CA_MUX_COMPILERS_TO_ENABLE`` should match
44+
the ``target_name`` field from the `JSON` file.
4445

4546
Now we build the ``UnitCL`` test target, which will also build all its
4647
dependencies, including the oneAPI Construction Kit and the new target:

examples/hal_cpu_remote_server/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ The client can built in-tree (for risc-v) as follows:
5151
```
5252
cmake -Bbuild_client -GNinja \
5353
-DCA_MUX_TARGETS_TO_ENABLE="riscv" \
54-
-DCA_RISCV_ENABLED=ON \
5554
-DCA_ENABLE_API=cl \
5655
-DCA_LLVM_INSTALL_DIR=<path_to_llvm_install> \
5756
-DCA_CL_ENABLE_ICD_LOADER=ON \
@@ -72,7 +71,7 @@ for different architectures. For example:
7271
7372
cmake -Bbuild_client -GNinja \
7473
-DCA_MUX_TARGETS_TO_ENABLE="cpu_client" \
75-
-DCA_CPU_CLIENT_ENABLED=ON \
74+
-DCA_MUX_COMPILERS_TO_ENABLE="cpu_client" \
7675
-DCA_ENABLE_API=cl \
7776
-DCA_LLVM_INSTALL_DIR=<path_to_llvm_install> \
7877
-DCA_CL_ENABLE_ICD_LOADER=ON \

0 commit comments

Comments
 (0)