From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25CDA45FF6; Mon, 6 Jan 2025 00:56:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF4C540270; Mon, 6 Jan 2025 00:56:26 +0100 (CET) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mails.dpdk.org (Postfix) with ESMTP id 17DCE4014F for ; Mon, 6 Jan 2025 00:56:25 +0100 (CET) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-53e399e3310so16530274e87.1 for ; Sun, 05 Jan 2025 15:56:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736121384; x=1736726184; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=kEWDEsKtND3Y11oRdhkHeLyDU2MYIMlbd+iH9937z90=; b=AxG+7TwYVAt4KKyWNcKJ9wz4wNWf6BZS6KTY0JjLzMTiKJ86OWzRGb/sRSxQs6pW0x uPhx8qwijAuMTGUToPFiB4divvtWqo4ws4/QswczRSQXCzARdOHM/3TG1EzVs56Ls8g9 wEwAP8Qkfb4VVH4vLHdPlsali3rmjwl2i/OUye+F32NId03YA/oB4ipLOLWbpHRQVGNU zpM7iV8Mk0PcENJO97clhaGN7ewq2V7lLNisT3rREw01Cand/HIWORfMf2jDjyeIYcFz YtA6A9mcQP5AaLwTMDUjZ2mD8j9AQoEodNBXT9wydvDy/4zMdEOP/3W+gjpmcMzXSBBH jUzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736121384; x=1736726184; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kEWDEsKtND3Y11oRdhkHeLyDU2MYIMlbd+iH9937z90=; b=tMxnR+5l1OzCwojmxgKwdfbsBUODo2lF1vGyZWyvZhJcfrwNJ5A78XDxsaPFjpMCxw 46pCHgGERS8Yh5a9f+RixqrkjKqlMBIy/toz92dzPEUo/Okz3GcwGNYGuED1HLJ5qJTK 0CgufqQb+/djwkpQ7xBd0tLVjy4BCU0lY/GFIhx7G7OAqlgF+mXuSe4UVOXsTAL3aN2a DFgsyednn617xeFTQkcqQieDaYoNNqBInrxYAiicdAQqeKhxBBuHGSN0UMeB8jw5XgOC lO4C9SfxNkX2SXEoXrz+iNJ9ryNVznAxPdsDz3MBdsw8m4tqVe7iVF4tRIIgRqpiAywM fg/A== X-Gm-Message-State: AOJu0YxJR272vg4Y8K7lGNs4wRBELovZ3+ZGb158lTSuNxOUVa93lOC3 5OSsk4Qp7V5c3vb2HerBj82xZfZHLyp/f6N8qu1j2jo1BrH4PrsK X-Gm-Gg: ASbGncvWm3nkEECdk5MwpTBRGS59DEAQYvlXVP2rMvECG7VGlhI2RR/VAGw9rKTD2Tg GXZAjQhhs4dToCiCXfeGvqA4gu1B8p9Z++lG4QgIYgnjw7Fa/NT0W1+Wts1DLNyL3kpBIytZ5YU LNQ+ErUHPrA9z7bg/aRfldYNZcqNSD5PN14MD4TsI2X09zDl7bser7ZY82GOY/+tHl/bvnAnsOM 1ezuzpK1tcPQN4B9rxzzSd5AE5C+pXcaE38GOccfQM85rpAacCAJyxwc95SzlylPIzb2OcFjPAx qHvHswW4NvYJQJl2RW7NktMPhQ9o X-Google-Smtp-Source: AGHT+IFTpIMSIbVOD90d03KPYTQHpFTGwHXTovtT3dzaWEf62EdFEec49L+6cshZ/UQnLYekQ9yOTQ== X-Received: by 2002:a05:6512:3ca8:b0:542:29e5:7322 with SMTP id 2adb3069b0e04-54229e573d9mr13845292e87.2.1736121384019; Sun, 05 Jan 2025 15:56:24 -0800 (PST) Received: from sovereign (broadband-109-173-43-194.ip.moscow.rt.ru. [109.173.43.194]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3045b069f26sm52871371fa.87.2025.01.05.15.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 15:56:23 -0800 (PST) Date: Mon, 6 Jan 2025 02:56:21 +0300 From: Dmitry Kozlyuk To: Zaid M Cc: dev@dpdk.org Subject: Re: Cross-Compiling x86_64 but for different CPU Message-ID: <20250106025621.1d175857@sovereign> In-Reply-To: References: X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 2024-12-31 11:45 (UTC+0300), Zaid M: > I have an Intel CPU but I want to compile an optimized binary for AMD > (x86_64) which may have a different CPU instruction set (e.g. avx512 or > avx512bw) and I don't want to use "-Dplatform=generic". How can I achieve > that? When you use `-Dplatform=generic`, parts of DPDK vectorized for e.g. AVX512 are still built, and DPDK will employ them if run on a CPU that supports them. Usually this is enough because fast-path routines have vectorized versions and the performance of other code is not critical, but not always. If you know that the host machine (AMD) has e.g. Zen3 instruction set, you can use `-Dcpu_instruction_set=zen3` to optimize the rest of DPDK code. This will make the build non-portable to machines without Zen3 though. P.S. Questions about DPDK usage belong to users@dpdk.org.