Skip to content

Commit 76a0504

Browse files
author
Caspar van Leeuwen
committed
Update bot build instructions for EESSI/eessi-bot-software-layer#312
1 parent 807c174 commit 76a0504

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

docs/bot.md

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ should be issued by posting a comment in the pull request (see also [here](addin
6666
The most basic build instruction that can be sent to the bot is:
6767

6868
```
69-
bot: build
69+
bot: build for:arch=<for_arch>
7070
```
7171

72-
!!! warning
73-
Only use `bot: build` if you are confident that it is OK to do so.
72+
Where the `for_arch` could be e.g. `x64_64/amd/zen4`. This will trigger the bot to allocate a node of that type _and_
73+
build in the `/cvmfs/software.eessi.io/versions/<eessi-version>/software/linux/x86_64/amd/zen4` prefix.
7474

75-
Most likely, you want to supply one or more filters to avoid that the bot builds for all its configurations.
75+
!!! warning
76+
Most likely, you want to supply one or more filters to avoid that all bots are triggered to build for all
77+
configurations that match the above command.
7678

7779
### Filters
7880

@@ -81,13 +83,14 @@ should be executed, based on:
8183

8284
- `instance`: the `name` of the bot instance, for example `instance:aws` for the bot instance running in AWS;
8385
- `repository`: the target repository, for example `eessi-2023.06-software` which corresponds to the 2023.06 version of the EESSI software layer;
84-
- `architecture`: the name of the [CPU microarchitecture](software_layer/cpu_targets.md), for example `x86_64/amd/zen2`;
86+
- `on:architecture=<on_arch>,accelerator=<on_accelerator>`: the name of the [CPU microarchitecture](software_layer/cpu_targets.md) and GPU accelerator you want to build _on_, for example `for:architecture=x86_64/amd/zen4,accelerator=nvidia/cc90`;
87+
- `for:architecture=<for_arch>,accelerator=<for_accelerator>`: the name of the [CPU microarchitecture](software_layer/cpu_targets.md) and GPU accelerator you want to build _for_, for example `on:architecture=x86_64/amd/zen4,accelerator=nvidia/cc90`;
8588

8689
!!! note
87-
Use `:` as separator to specify a value for a particular filter, do not add spaces after the `:`.
90+
Use `:` as separator to specify a value for a particular argument, do not add spaces after the `:`.
8891

8992
The bot recognizes shorthands for the supported filters, so you can use `inst:...` instead of `instance:...`,
90-
`repo:...` instead of `repository:...`, and `arch:...` instead of `architecture:...`.
93+
`repo:...` instead of `repository:...`, and `arch=...` instead of `architecture=...`, and `accel=` instead of `accelerator`.
9194

9295
#### Combining filters
9396

@@ -97,7 +100,7 @@ Separate filters with a space, order of filters does not matter.
97100
For example:
98101

99102
```
100-
bot: build repo:eessi.io-2023.06-software arch:x86_64/amd/zen2
103+
bot: build repo:eessi.io-2023.06-software for:arch=x86_64/amd/zen2
101104
```
102105

103106
#### Multiple build instructions
@@ -108,17 +111,38 @@ repositories, and CPU targets. Specify one build instruction per line.
108111
For example:
109112

110113
```
111-
bot: build repo:eessi.io-2023.06-software arch:x86_64/amd/zen3 inst:aws
112-
bot: build repo:eessi.io-2023.06-software arch:x86_64/amd/zen4 inst:azure
114+
bot: build repo:eessi.io-2023.06-software for:arch=x86_64/amd/zen3 inst:aws
115+
bot: build repo:eessi.io-2023.06-software for:arch=x86_64/amd/zen4 inst:azure
113116
```
114117

115-
!!! note
116-
The bot applies the filters with partial matching, which you can use to combine multiple build
117-
instructions into a single one.
118+
#### Native builds
119+
120+
If you want to allocate the same node type that you want to build for, you can ommit the `on:` argument.
121+
For example: `bot:build for:arch=x86_64/amd/zen4` is fully equivalent to `bot:build on:arch=x86_64/amd/zen4 for:arch=x86_64/amd/zen4`.
118122

119-
For example, if you only want to build for all `aarch64` CPU targets, you can use `arch:aarch64` as filter.
123+
#### Cross-compiling
120124

121-
The same applies to the `instance` and `repository` filters.
125+
The reason for the separate `on:` and `for:` arguments to exist is to allow cross-compilation, and to be specific about
126+
which architecture to allocate when doing so. The typical use case is to build GPU software on a CPU-only node.
127+
128+
For example: `bot:build on:arch=x86_64/amd/zen2 for:arch=x86_64/amd/zen2,accel=nvidia/cc80` will instruct the bot to
129+
build on a `zen2` CPU-only node, for a combination of a `zen2` CPU with a GPU with CUDA Compute Capability 8.0.
130+
131+
!!! warning
132+
Cross-compilation for different CPU targets can _not_ be done with the current setup. This is not a limitation of
133+
the bot, but of the build scripts in the `software-layer-scripts` repository. The only thing the bot does is
134+
prepare a job directory in which the configuration passed through `for:` is stored in a `job.cfg` file. What is
135+
_done_ with that information is up to the build scripts from `software-layer-scripts`. While these currently
136+
set the CUDA Compute Capability configuration item for EasyBuild based on the accelerator target defined in the
137+
`job.cfg`, the architecture target is _only_ used to determine the installation path. It is _not_ used to set
138+
EasyBuild's `optarch` configuration, which will still default to native optimization (i.e. for the host).
139+
140+
#### Partial filter matching
141+
The bot applies the filters with partial matching, but _not_ for the `for:` argument. I.e. you can do
142+
`bot:build on:arch=zen4 for:arch=x84_64/amd/zen4,accel=nvidia/cc80`, but not
143+
`bot:build on:arch=zen4 for:arch=zen4,accel=nvidia/cc80`
144+
The reason is that for the `on:` argument, the bot can compare against the configured node types to find a match
145+
(while for the `for:` argument, there is no such reference to match against).
122146

123147
### Behind-the-scenes
124148

0 commit comments

Comments
 (0)