From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 14C98AFE34D; Thu, 11 Apr 2024 18:25:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 14C98AFE34D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1712849129; bh=6utG0CTxtY/eUOsCevIT9YuMRuavzmd+pXyKmvBVjxw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=U4nUmJG/B6jk+n1uJygVpC/MQ1lLoY6Zn93L1SS9eTFqR7qAd67J6GRCOiirrzmhZ nLgL8TopC5Ra00nWwBG1xdUc9DQAgyTGKpU+UzTovK0ejBk5MdOnWD0VwfbggBGwmY 5f9xSUYb2mh1eCIkwyc5ff0wZtK1Yz6LMYT2zd7w= Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 99949AFE34D for ; Thu, 11 Apr 2024 18:25:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 99949AFE34D Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-516d09bd434so8953561e87.1 for ; Thu, 11 Apr 2024 08:25:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849122; x=1713453922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BVTTNKjqSzXfQC43U542YB0JJzmrpBirMsmIZuXBoRY=; b=gfo7d45YtU8ZRAXAr2d2cAPZDrO4TLmgPOXlEqc4jgxdAPyGI/DABji92ObYrq2vzw BQuwCYXPkj4chSY8SpAJf67a7PMBxOxfZT7mYePc5mOWm8Gf75z1OmIoR1XeizDxTXLg JSiiaCMH1rMnMb49iwxGeErlFHsPTaE3wurlatkLi3EjA8t2hUEACSsOQPwV0IHadjyC oxkJ/So5HSeI4x0HkTHUYGcfq8KE66QsM1GaHfl+y3C1lydTSSAWPTlXWzDNVFHc5avH MiK0Y6dmGqcuDDiOUHkPVFGj2AgowXHmzXqpSaxKS3xrjdo3eNZwkAjeZxlrdF+xSVIm TwYg== X-Gm-Message-State: AOJu0YyFOcbHDzk/W/IILn2/L4Iw8wesrnnDtwGYJPFMnhKpfG8Hkvws fh2xeS4F8Ouc/xAmB2ftgncZvaSZM0cqbwMlIAyI0PQ3YdWNcX+OdFKbMg== X-Google-Smtp-Source: AGHT+IGooDDBkTV6uGmcz2iHDkLujTxiXmXh9a4yCm59zrkM8zjhPoov911iNfNouXXf6a2PP4cHwA== X-Received: by 2002:a05:6512:e9b:b0:516:be65:d1fe with SMTP id bi27-20020a0565120e9b00b00516be65d1femr33504lfb.45.1712849121582; Thu, 11 Apr 2024 08:25:21 -0700 (PDT) Received: from pony.. ([5.181.62.126]) by smtp.gmail.com with ESMTPSA id b5-20020ac25e85000000b00516d6419a70sm235623lfq.85.2024.04.11.08.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:25:21 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Thu, 11 Apr 2024 16:22:02 +0300 Message-Id: <6777a43e3012332d04493f93d6afe7fb4156af1b.1712841312.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 1/4][v2] ci: add a workflow for testing with AVX512 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov This commit adds a workflow for building and testing with enabled AVX512. Needed for tarantool/tarantool#9595 Related to tarantool/tarantool#6787 --- .github/actions/setup-linux/action.yml | 12 +++++ .github/workflows/avx512-build-testing.yml | 54 ++++++++++++++++++++++ test/LuaJIT-tests/lib/ffi/bit64.lua | 2 +- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/avx512-build-testing.yml diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml index f0171b83..19bdcfa2 100644 --- a/.github/actions/setup-linux/action.yml +++ b/.github/actions/setup-linux/action.yml @@ -17,3 +17,15 @@ runs: apt -y update apt -y install cmake gcc make ninja-build perl shell: bash + - name: Detect a presence of AVX512 + id: avx512_script + run: | + # Set avx512_support environment variable to 'true' when AVX512 + # is supported and 'false' otherwise. + # + # Normally `grep` has the exit status is 0 if a line is + # selected, 1 if no lines were selected, and 2 if an error + # occurred. + avx512_support=$(grep avx /proc/cpuinfo 2>&1 > /dev/null; [[ $? == 0 ]] && echo 0 || echo 1) + echo "avx512_support=$avx512_support" >> $GITHUB_OUTPUT + shell: bash diff --git a/.github/workflows/avx512-build-testing.yml b/.github/workflows/avx512-build-testing.yml new file mode 100644 index 00000000..d70fa661 --- /dev/null +++ b/.github/workflows/avx512-build-testing.yml @@ -0,0 +1,54 @@ +name: "AVX512 build testing" + +on: + push: + branches-ignore: + - '**-notest' + - 'upstream-**' + tags-ignore: + - '**' + +concurrency: + # An update of a developer branch cancels the previously + # scheduled workflow run for this branch. However, the default + # branch, and long-term branch (tarantool/release/2.11, + # tarantool/release/2.10, etc) workflow runs are never canceled. + # + # We use a trick here: define the concurrency group as 'workflow + # run ID' + # 'workflow run attempt' because it is a unique + # combination for any run. So it effectively discards grouping. + # + # XXX: we cannot use `github.sha` as a unique identifier because + # pushing a tag may cancel a run that works on a branch push + # event. + group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') + && format('{0}-{1}', github.run_id, github.run_attempt) + || format('{0}-{1}', github.workflow, github.ref) }} + cancel-in-progress: true + +jobs: + test-avx512: + strategy: + fail-fast: false + runs-on: [self-hosted, regular, x86_64, Linux] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: setup Linux + uses: ./.github/actions/setup-linux + - name: configure + if: needs.avx512_script.outputs.avx512_support == 0 + run: > + cmake -S . -B ${{ env.BUILDDIR }} + -G Ninja + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_C_FLAGS=-march=skylake-avx512 + -DCMAKE_C_COMPILER=gcc + - name: build + if: needs.avx512_script.outputs.avx512_support == 0 + run: cmake --build ${{ env.BUILDDIR }} --parallel + - name: run regression tests + if: needs.avx512_script.outputs.avx512_support == 0 + run: cmake --build ${{ env.BUILDDIR }} --parallel --target LuaJIT-test diff --git a/test/LuaJIT-tests/lib/ffi/bit64.lua b/test/LuaJIT-tests/lib/ffi/bit64.lua index d1b47bef..cf3a96eb 100644 --- a/test/LuaJIT-tests/lib/ffi/bit64.lua +++ b/test/LuaJIT-tests/lib/ffi/bit64.lua @@ -41,7 +41,7 @@ do --- tobit/band assorted C types end end -do --- tobit/band negative unsigned enum +do --- tobit/band negative unsigned enum -avx512 local x = ffi.new("uenum_t", -10) local y = tobit(x) local z = band(x) -- 2.34.1