From 336e01f0e18860fe408040c2133e4c4c71d3640d Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Tue, 15 Feb 2022 12:55:09 +0200 Subject: [PATCH] ci: Optimize virtio-gpu jobs execution Since crosvm is not able to properly handle parallel tests due to a concurrency bottleneck, it's necessary to ensuring scaling at the host system level by increasing the number of active crosvm instances. For dEQP testing this can be easily accomplished by using the Deqp Suite support in deqp-runner and adding the crosvm wrapper script in the related '*.toml' files. For piglit this is currently not supported in piglit-runner, but something similar could be added later. For the moment we use an increased number of parallel jobs to speed-up the execution. Signed-off-by: Cristian Ciocaltea Reviewed-by: Guilherme Gallo Acked-by: Daniel Stone --- .gitlab-ci.yml | 13 +++++--- .gitlab-ci/container/debian/x86_test.sh | 12 ++++--- .../expectations/virt/deqp-virgl-gl.toml | 20 +++++++---- .../expectations/virt/deqp-virgl-gles.toml | 33 +++++++++++++++---- ci/.gitlab-ci.yml | 13 +++++--- 5 files changed, 63 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a50cd5c..68f49b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,7 +147,7 @@ make check venus: variables: GALLIUM_DRIVER: virgl CROSVM_GALLIUM_DRIVER: llvmpipe - GALLIVM_PERF: nopt + GALLIVM_PERF: "nopt,no_quad_lod" .deqp-host: extends: @@ -167,16 +167,19 @@ make check venus: extends: - .gl-virt-test variables: - TEST_SCRIPT: "install/deqp-runner.sh" + # There will be FDO_CI_CONCURRENT Crosvm processes, so each should use a single thread + LP_NUM_THREADS: 1 parallel: 3 .piglit-virt: extends: - - .deqp-virt + - .gl-virt-test variables: <<: *piglit-host-variables - TEST_SCRIPT: "install/piglit/piglit-runner.sh" - parallel: 2 + # Use all threads for rendering and only run one job at a time + LP_NUM_THREADS: ${FDO_CI_CONCURRENT} + FORCE_FDO_CI_CONCURRENT: 1 + parallel: 4 # Host runners (virpipe/vtest) diff --git a/.gitlab-ci/container/debian/x86_test.sh b/.gitlab-ci/container/debian/x86_test.sh index 522b5b1..aef221a 100755 --- a/.gitlab-ci/container/debian/x86_test.sh +++ b/.gitlab-ci/container/debian/x86_test.sh @@ -57,13 +57,15 @@ if [ "${GALLIUM_DRIVER}" = "virgl" ]; then mkdir ${CI_PROJECT_DIR}/install mount --bind install ${CI_PROJECT_DIR}/install + export LD_LIBRARY_PATH="${CI_PROJECT_DIR}/install/lib" set +e - # Use all threads for rendering and only run one job at a time - LP_NUM_THREADS=${FDO_CI_CONCURRENT} \ - FDO_CI_CONCURRENT=1 \ - LD_LIBRARY_PATH=${CI_PROJECT_DIR}/install/lib \ - install/crosvm-runner.sh "${TEST_SCRIPT}" + if [ -z "${DEQP_SUITE}" ]; then + FDO_CI_CONCURRENT=${FORCE_FDO_CI_CONCURRENT:-FDO_CI_CONCURRENT} \ + install/crosvm-runner.sh install/piglit/piglit-runner.sh + else + install/deqp-runner.sh + fi RET=$? diff --git a/.gitlab-ci/expectations/virt/deqp-virgl-gl.toml b/.gitlab-ci/expectations/virt/deqp-virgl-gl.toml index f65be42..fc874c4 100644 --- a/.gitlab-ci/expectations/virt/deqp-virgl-gl.toml +++ b/.gitlab-ci/expectations/virt/deqp-virgl-gl.toml @@ -1,51 +1,57 @@ [[deqp]] -deqp = "/deqp/modules/gles2/deqp-gles2" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles2-master.txt"] deqp_args = [ + "/deqp/modules/gles2/deqp-gles2", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time version_check = "GL ES 3.2.*git" -renderer_check = "virgl" +renderer_check = "virgl.*llvmpipe" [[deqp]] -deqp = "/deqp/modules/gles3/deqp-gles3" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles3-master.txt"] deqp_args = [ + "/deqp/modules/gles3/deqp-gles3", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] -timeout = 180.0 +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time [[deqp]] -deqp = "/deqp/modules/gles31/deqp-gles31" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles31-master.txt"] deqp_args = [ + "/deqp/modules/gles31/deqp-gles31", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] -timeout = 180.0 +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time [[deqp]] -deqp = "/deqp/external/openglcts/modules/glcts" +deqp = "/install/crosvm-runner.sh" caselists = [ "/deqp/mustpass/gl30-master.txt", "/deqp/mustpass/gl31-master.txt", "/deqp/mustpass/gl32-master.txt", ] deqp_args = [ + "/deqp/external/openglcts/modules/glcts", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time diff --git a/.gitlab-ci/expectations/virt/deqp-virgl-gles.toml b/.gitlab-ci/expectations/virt/deqp-virgl-gles.toml index 812f82e..fc874c4 100644 --- a/.gitlab-ci/expectations/virt/deqp-virgl-gles.toml +++ b/.gitlab-ci/expectations/virt/deqp-virgl-gles.toml @@ -1,36 +1,57 @@ [[deqp]] -deqp = "/deqp/modules/gles2/deqp-gles2" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles2-master.txt"] deqp_args = [ + "/deqp/modules/gles2/deqp-gles2", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time version_check = "GL ES 3.2.*git" -renderer_check = "virgl" +renderer_check = "virgl.*llvmpipe" [[deqp]] -deqp = "/deqp/modules/gles3/deqp-gles3" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles3-master.txt"] deqp_args = [ + "/deqp/modules/gles3/deqp-gles3", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] -timeout = 180.0 +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time [[deqp]] -deqp = "/deqp/modules/gles31/deqp-gles31" +deqp = "/install/crosvm-runner.sh" caselists = ["/deqp/mustpass/gles31-master.txt"] deqp_args = [ + "/deqp/modules/gles31/deqp-gles31", "--deqp-surface-width=256", "--deqp-surface-height=256", "--deqp-surface-type=pbuffer", "--deqp-gl-config-name=rgba8888d24s8ms0", "--deqp-visibility=hidden" ] -timeout = 180.0 +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time + +[[deqp]] +deqp = "/install/crosvm-runner.sh" +caselists = [ + "/deqp/mustpass/gl30-master.txt", + "/deqp/mustpass/gl31-master.txt", + "/deqp/mustpass/gl32-master.txt", +] +deqp_args = [ + "/deqp/external/openglcts/modules/glcts", + "--deqp-surface-width=256", + "--deqp-surface-height=256", + "--deqp-surface-type=pbuffer", + "--deqp-gl-config-name=rgba8888d24s8ms0", + "--deqp-visibility=hidden" +] +timeout = 360.0 # Starting 8 Crosvm instances simultaneously can take some time diff --git a/ci/.gitlab-ci.yml b/ci/.gitlab-ci.yml index ef3dd2e..0fac4ba 100644 --- a/ci/.gitlab-ci.yml +++ b/ci/.gitlab-ci.yml @@ -159,7 +159,7 @@ make check venus: variables: GALLIUM_DRIVER: virgl CROSVM_GALLIUM_DRIVER: llvmpipe - GALLIVM_PERF: nopt + GALLIVM_PERF: "nopt,no_quad_lod" .deqp-host: extends: @@ -179,16 +179,19 @@ make check venus: extends: - .gl-virt-test variables: - TEST_SCRIPT: "install/deqp-runner.sh" + # There will be FDO_CI_CONCURRENT Crosvm processes, so each should use a single thread + LP_NUM_THREADS: 1 parallel: 3 .piglit-virt: extends: - - .deqp-virt + - .gl-virt-test variables: <<: *piglit-host-variables - TEST_SCRIPT: "install/piglit/piglit-runner.sh" - parallel: 2 + # Use all threads for rendering and only run one job at a time + LP_NUM_THREADS: ${FDO_CI_CONCURRENT} + FORCE_FDO_CI_CONCURRENT: 1 + parallel: 4 # Host runners (virpipe/vtest)