Skip to content

Commit

Permalink
rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
goliaro committed Nov 1, 2023
1 parent bf88353 commit 4d960e1
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gpu-ci-skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- ".github/workflows/gpu-ci.yml"
- "tests/cpp_gpu_tests.sh"
- "tests/inference_tests.sh"
- "tests/multi_gpu_tests.sh"
- "tests/training_tests.sh"
- "tests/python_interface_test.sh"
workflow_dispatch:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- ".github/workflows/gpu-ci.yml"
- "tests/cpp_gpu_tests.sh"
- "tests/inference_tests.sh"
- "tests/multi_gpu_tests.sh"
- "tests/training_tests.sh"
- "tests/python_interface_test.sh"
push:
branches:
Expand All @@ -34,7 +34,7 @@ on:
- ".github/workflows/gpu-ci.yml"
- "tests/cpp_gpu_tests.sh"
- "tests/inference_tests.sh"
- "tests/multi_gpu_tests.sh"
- "tests/training_tests.sh"
- "tests/python_interface_test.sh"
workflow_dispatch:

Expand Down Expand Up @@ -267,5 +267,5 @@ jobs:
# C++ tests
./tests/cpp_gpu_tests.sh 4
# Python tests
./tests/multi_gpu_tests.sh 4
./tests/training_tests.sh 4
6 changes: 3 additions & 3 deletions .github/workflows/multinode-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_MCA_btl_vader_single_copy_mechanism=none
./tests/multi_gpu_tests.sh 2 2
./tests/training_tests.sh 2 2
multinode-gpu-test-ucx:
name: Multinode GPU Test with UCX
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_MCA_btl_vader_single_copy_mechanism=none
./tests/multi_gpu_tests.sh 2 2
./tests/training_tests.sh 2 2
multinode-gpu-test-native-ucx:
name: Multinode GPU Test with native UCX
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_MCA_btl_vader_single_copy_mechanism=none
./tests/multi_gpu_tests.sh 2 2
./tests/training_tests.sh 2 2
notify-slack:
name: Notify Slack in case of failure
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ source ./build/set_python_envs.sh
cd "$FF_HOME"
./python/flexflow_python examples/python/native/mnist_mlp.py -ll:py 1 -ll:gpu 1 -ll:fsize <size of gpu buffer> -ll:zsize <size of zero buffer>
```
A script to run all the Python examples is available at `tests/multi_gpu_tests.sh`
A script to run all the Python examples is available at `tests/training_tests.sh`

### Run FlexFlow C++ examples

Expand Down
2 changes: 1 addition & 1 deletion tests/multinode_helpers/mpi_wrapper1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ if [ -z "$GPUS" ]; then echo "GPUS variable is not defined, aborting tests"; exi

# We need to wrap the instruction below in its own script because MPI throws an error if we try
# to run "mpirun" more than once in the same script. Hence, we cannot simply call "mpirun" in the
# multi_gpu_tests.sh script
# training_tests.sh script
mpirun -np "$NUM_NODES" "$FF_HOME"/tests/multinode_helpers/mpi_wrapper2.sh "$@"
6 changes: 3 additions & 3 deletions tests/python_interface_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ check_python_interface() {

# Generate configs JSON files
test_params=$(jq -n --arg num_gpus "$GPUS" --arg memory_per_gpu "$FSIZE" --arg zero_copy_memory_per_node "$ZSIZE" --arg batch_size "$BATCHSIZE" --arg only_data_parallel "$ONLY_DATA_PARALLEL" '{"num_gpus":$num_gpus,"memory_per_gpu":$memory_per_gpu,"zero_copy_memory_per_node":$zero_copy_memory_per_node,"batch_size":$batch_size,"only_data_parallel":$only_data_parallel}')
mkdir -p /tmp/flexflow/multi_gpu_tests
echo "$test_params" > /tmp/flexflow/multi_gpu_tests/test_params.json
mkdir -p /tmp/flexflow/training_tests
echo "$test_params" > /tmp/flexflow/training_tests/test_params.json

if [[ "$interpreter" == "python" ]]; then
EXE="python"
echo "Running a single-GPU Python test to check the Python interface (native python interpreter)"
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp.py -config-file /tmp/flexflow/training_tests/test_params.json
elif [[ "$interpreter" == "flexflow_python" ]]; then
if [[ "$installation_status" == "before-installation" ]]; then
EXE="$BUILD_FOLDER"/flexflow_python
Expand Down
88 changes: 44 additions & 44 deletions tests/multi_gpu_tests.sh → tests/training_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,57 +33,57 @@ test_params_5_epochs=$(echo "$test_params" | jq '. + {"epochs": 5}')
test_params_40_epochs=$(echo "$test_params" | jq '. + {"epochs": 40}')
test_params_5_epochs_no_batch_size=$(echo "$test_params_5_epochs" | jq 'del(.batch_size)')
test_params_40_epochs_no_batch_size=$(echo "$test_params_40_epochs" | jq 'del(.batch_size)')
mkdir -p /tmp/flexflow/multi_gpu_tests
echo "$test_params" > /tmp/flexflow/multi_gpu_tests/test_params.json
echo "$test_params_5_epochs" > /tmp/flexflow/multi_gpu_tests/test_params_5_epochs.json
echo "$test_params_5_epochs_no_batch_size" > /tmp/flexflow/multi_gpu_tests/test_params_5_epochs_no_batch_size.json
echo "$test_params_40_epochs_no_batch_size" > /tmp/flexflow/multi_gpu_tests/test_params_40_epochs_no_batch_size.json
mkdir -p /tmp/flexflow/training_tests
echo "$test_params" > /tmp/flexflow/training_tests/test_params.json
echo "$test_params_5_epochs" > /tmp/flexflow/training_tests/test_params_5_epochs.json
echo "$test_params_5_epochs_no_batch_size" > /tmp/flexflow/training_tests/test_params_5_epochs_no_batch_size.json
echo "$test_params_40_epochs_no_batch_size" > /tmp/flexflow/training_tests/test_params_40_epochs_no_batch_size.json

#Sequential model tests
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
#$EXE "$FF_HOME"/examples/python/keras/seq_reuters_mlp.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_cifar10_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp_net2net.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn_net2net.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn_nested.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn.py -config-file /tmp/flexflow/training_tests/test_params.json
#$EXE "$FF_HOME"/examples/python/keras/seq_reuters_mlp.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_cifar10_cnn.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_mlp_net2net.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn_net2net.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/seq_mnist_cnn_nested.py -config-file /tmp/flexflow/training_tests/test_params.json

#Keras other
$EXE "$FF_HOME"/examples/python/keras/callback.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/unary.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/reshape.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/elementwise_mul_broadcast.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/reduce_sum.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/identity_loss.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/elementwise_max_min.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/rsqrt.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/gather.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/regularizer.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/callback.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/unary.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/reshape.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/elementwise_mul_broadcast.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/reduce_sum.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/identity_loss.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/elementwise_max_min.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/rsqrt.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/gather.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/regularizer.py -config-file /tmp/flexflow/training_tests/test_params.json

#Functional API
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_concat.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_concat2.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_cnn_concat.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_nested.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_alexnet.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_net2net.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_net2net.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_concat.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_concat2.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_cnn.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_cnn_concat.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_nested.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_alexnet.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_mnist_mlp_net2net.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_net2net.py -config-file /tmp/flexflow/training_tests/test_params.json

#Python
$EXE "$FF_HOME"/examples/python/native/print_layers.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/split.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/native/alexnet.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_40_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/mnist_mlp.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/mnist_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_40_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn_attach.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_5_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/mnist_mlp_attach.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_5_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/print_layers.py -config-file /tmp/flexflow/training_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/split.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/native/alexnet.py -config-file /tmp/flexflow/training_tests/test_params_40_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/mnist_mlp.py -config-file /tmp/flexflow/training_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/mnist_cnn.py -config-file /tmp/flexflow/training_tests/test_params_5_epochs.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn.py -config-file /tmp/flexflow/training_tests/test_params_40_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn_attach.py -config-file /tmp/flexflow/training_tests/test_params_5_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/native/mnist_mlp_attach.py -config-file /tmp/flexflow/training_tests/test_params_5_epochs_no_batch_size.json

#Possible crash
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat_model.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat_seq_model.py -config-file /tmp/flexflow/multi_gpu_tests/test_params.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn_concat.py -config-file /tmp/flexflow/multi_gpu_tests/test_params_40_epochs_no_batch_size.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat_model.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/keras/func_cifar10_cnn_concat_seq_model.py -config-file /tmp/flexflow/training_tests/test_params.json
$EXE "$FF_HOME"/examples/python/native/cifar10_cnn_concat.py -config-file /tmp/flexflow/training_tests/test_params_40_epochs_no_batch_size.json

0 comments on commit 4d960e1

Please sign in to comment.