Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,29 @@ $ python3 ./astra-sim-alibabacloud/inputs/topo/gen_Topo_Template.py -topo Spectr
$ AS_SEND_LAT=3 AS_NVLS_ENABLE=1 ./bin/SimAI_simulator -t 16 -w ./example/microAllReduce.txt -n ./Spectrum-X_128g_8gps_100Gbps_A100 -c astra-sim-alibabacloud/inputs/config/SimAI.conf
```

### Run ns-3 module tests

The `ns-3-alibabacloud` module tests are managed by ns-3's `test.py` / `test-runner`, not by `ctest`.
For the point-to-point module, use the suite name `devices-point-to-point`.

```bash
# Make sure submodules are initialized
$ git submodule update --init --recursive

# Run the point-to-point ns-3 module test
$ ./scripts/build.sh -t ns3 devices-point-to-point
```

If you run the test from the ns-3 workspace directly, use:

```bash
$ cd ./ns-3-alibabacloud/simulation
$ ./ns3 configure --enable-tests --disable-examples
$ ./ns3 build
$ ./ns3 run "test-runner --print-test-name-list"
$ python3 ./test.py --no-build -s devices-point-to-point
```

## Use Multi-requests Inference Simulation

For detailed information, please refer to the [README](./vidur-alibabacloud/README.md) file in the `vidur-alibabacloud` directory. This module leverages AICB to profile the computation time of **inference** workloads. Due to its reliance on specific hardware-accelerated libraries like DeepGEMM and FlashMLA, it is exclusively compatible with NVIDIA GPUs based on the **Hopper (SM90)** and **Blackwell (SM100)** architectures.
Expand Down
9 changes: 9 additions & 0 deletions docs/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ python3 ./astra-sim-alibabacloud/inputs/topo/gen_Topo_Template.py -g 32 -bw 200G
$ AS_SEND_LAT=3 AS_NVLS_ENABLE=1 ./bin/SimAI_simulator -t 16 -w ./example/microAllReduce.txt -n ./Spectrum-X_8g_8gps_400Gbps_H100 -c astra-sim-alibabacloud/inputs/config/SimAI.conf
```

### Run ns-3 module tests

`ns-3-alibabacloud` module tests use ns-3's `test.py` / `test-runner`.
For the point-to-point test, the suite name is `devices-point-to-point`.

```bash
$ ./scripts/build.sh -t ns3 devices-point-to-point
```

| Environment Variable Name | Description | Default Value |
|---------------------------|----------------------------------|-------------------------------------------|
| `AS_LOG_LEVEL` | Log level | `DEBUG`, `INFO`, `WARNING`, `ERROR`, `UNKNOWN`; default is `INFO` |
Expand Down
40 changes: 39 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,41 @@ function compile {
esac
}

function run_test {
local option="$1"
local suite="$2"
local available_suites
case "$option" in
"ns3")
if [ ! -d "${NS3_DIR:?}/simulation" ]; then
printf -- "ns-3-alibabacloud submodule is not initialized. Run: git submodule update --init --recursive\n"
return 1
fi
if [ -z "${suite}" ]; then
printf -- "missing ns-3 test suite name\n"
printf -- "example: ./scripts/build.sh -t ns3 devices-point-to-point\n"
return 1
fi
if [ "${suite}" = "point-to-point" ]; then
printf -- "point-to-point module tests use the ns-3 suite name 'devices-point-to-point'.\n"
fi
cd "${NS3_DIR:?}"/simulation || return 1
./ns3 configure --enable-tests --disable-examples || return 1
./ns3 build || return 1
available_suites=$(./ns3 run "test-runner --print-test-name-list") || return 1
if ! printf -- "%s\n" "${available_suites}" | grep -Fx -- "${suite}" >/dev/null; then
printf -- "Unknown ns-3 test suite: %s\n" "${suite}"
if [ "${suite}" = "point-to-point" ]; then
printf -- "Use 'devices-point-to-point' for point-to-point module tests.\n"
fi
printf -- "Use './ns3 run \"test-runner --print-test-name-list\"' to list available suites.\n"
return 1
fi
python3 ./test.py --no-build -s "${suite}" || return 1
;;
esac
}

function cleanup_build {
local option="$1"
case "$option" in
Expand Down Expand Up @@ -77,9 +112,12 @@ case "$1" in
cleanup_build "$2";;
-c|--compile)
compile "$2";;
-t|--test)
run_test "$2" "$3";;
-h|--help|*)
printf -- "help message\n"
printf -- "-c|--compile mode supported ns3/phy/analytical (example:./build.sh -c ns3)\n"
printf -- "-l|--clean (example:./build.sh -l ns3)\n"
printf -- "-t|--test mode supported ns3 with suite name (example:./build.sh -t ns3 devices-point-to-point)\n"
printf -- "-lr|--clean-result mode (example:./build.sh -lr ns3)\n"
esac
esac
Loading