public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-torch] rawhide: Improve paralellism on multisocket CPU
Date: Tue, 18 Aug 2026 22:43:39 GMT	[thread overview]
Message-ID: <178709301918.1.15179946537485626917.rpms-python-torch-749d91ee2c96@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-torch
            Branch : rawhide
            Commit : 749d91ee2c96fc2d7e413d0cde294037e75f3f9a
            Author : Miroslav Suchý <msuchy@redhat.com>
            Date   : 2026-08-18T22:42:50+00:00
            Stats  : +1/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-torch/c/749d91ee2c96fc2d7e413d0cde294037e75f3f9a?branch=rawhide

            Log:
            Improve paralellism on multisocket CPU

Current formula counts CPUs in first socket only. This change counts
all physical cores in all sockets.

I have system with two socket (each of them has 28 cores. As result the job is
running with `-j 28` instead of `-j 112` and building at 25% utilization.

---
diff --git a/python-torch.spec b/python-torch.spec
index e9e522d..a0530ef 100644
--- a/python-torch.spec
+++ b/python-torch.spec
@@ -632,7 +632,7 @@ sed -i -e 's@USE_MSLK_DEFAULT ON@USE_MSLK_DEFAULT OFF@' CMakeLists.txt
 #
 %ifarch x86_64
 # Real cores, No hyperthreading
-COMPILE_JOBS=`cat /proc/cpuinfo | grep -m 1 'cpu cores' | awk '{ print $4 }'`
+COMPILE_JOBS=`lscpu -p=CORE | grep -v '^#' | sort -u |wc -l`
 %else
 # cpuinfo format varies on other arches, fall back to nproc
 COMPILE_JOBS=`nproc`

                 reply	other threads:[~2026-08-18 22:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178709301918.1.15179946537485626917.rpms-python-torch-749d91ee2c96@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox