From nobody Fri Nov 17 17:00:33 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SX37Q2mkzz519L8; Fri, 17 Nov 2023 17:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SX37Q0M4Sz4QxL; Fri, 17 Nov 2023 17:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSGLjdmNNutkAPauyC8myGx2J9S2PC4sZN4bhGz8aYY=; b=mi24E2G5D7TRUC92R4VexM4ER7OHDo34jwHvL1xR6VNDqDPdpScYv6sCbLlUQmU0oBu80W y0E20obbQJdh14Cxu7Oi5iaUNubBLVT9ay40ZUsU6pzJC9Z9yd7Y/6t4S0r2CCBqaif4ql ANtkR+Ki1NKjPtcQbblEmtHJtBcaAp6mmrI8EnQ3wERmokMeS64dKWGia+n2hBriFk1OaD ARnu6XM719P4hsOeHL4vdXkUtboQm+++PO8NJP9xEHKAbiUo87HJ31fwQK0RpBqHuVqymT q/nD0whsh2cFkXQf/87kH3CPZ+46vaHtiFwRmRpYlM6F3zaGpSmukd8Fizj+Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700240434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dSGLjdmNNutkAPauyC8myGx2J9S2PC4sZN4bhGz8aYY=; b=Yrzn2RmMWvD+LJnsPo8W0hMikxKLz7JRWBz2FICw28CEOomjobaQSOAKJ75f+gAfBIL7mf FGEpCoxkqbQVglh6gqUkHg0aQWko6Zw5bhVFgSfA9NHZADrsynbieHgVqxLm3ILZUXGIzw IinomENkwcKrMJsMJnYzrx6zA6JvP0B2u37dnV/uzCcMhka/BrO5Yss4X8m+vCE6wzKmJ8 ZLfZmRX0RA0Dh9Iq4F6hk9m5HPw1UIas8OYE/9rTjHCDUe/LT5jbGCUcxq4uhLC77LAb1b ZMgeKCiZjToTizeKC1wi0Bax3sGtc6LaThF/wPeDYhPfOslFfRrsTrJw3BGSEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700240434; a=rsa-sha256; cv=none; b=aSQN/VZb0/RxVoAPc44SRrEoksO5mFGJXhD1H+fntLhcfaLh7Pg1cDCRgrEbgV/7MzPX5x K2OdD9TBpNAzlgvY8Zxdkb5W6KCEnAuKoPCL8oV1kq41Zv31tJXMZcLiLgYOpl3ZCl+GRr CjhQI+NJxAD7jLvvksjndxG6unHYW6hQflRoXKzp7uwn4bVN6p2GNCAtxQxGzHx15CgjwU 9Fls41HjSv4frqHuZUby9xVedtbdoSQi4xSxtQ6hzEk6FvrVR+6Asz9KDkijWQnwvaDAb8 6GSnWYlFRbaH4U3qFkkhD/axStZRQnkWrgbd4CsvvKDi+uB1/kAAYfeX/KyWRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SX37P6XVyzrbY; Fri, 17 Nov 2023 17:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHH0X8o067387; Fri, 17 Nov 2023 17:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHH0XGn067384; Fri, 17 Nov 2023 17:00:33 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:00:33 GMT Message-Id: <202311171700.3AHH0XGn067384@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 705e9e930b1a - main - misc/py-pytorch: Fix run-time failure: error: use of undeclared identifier '__assert_fail' List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 705e9e930b1a2b12ee18d0becc94174a2c0c94f9 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=705e9e930b1a2b12ee18d0becc94174a2c0c94f9 commit 705e9e930b1a2b12ee18d0becc94174a2c0c94f9 Author: Yuri Victorovich AuthorDate: 2023-11-17 16:58:42 +0000 Commit: Yuri Victorovich CommitDate: 2023-11-17 17:00:31 +0000 misc/py-pytorch: Fix run-time failure: error: use of undeclared identifier '__assert_fail' One particular GPU-related assert macro has to be patched to be a regular assert. The problem was reported to the upstream. --- misc/py-pytorch/Makefile | 1 + misc/py-pytorch/files/patch-CMakeLists.txt | 10 +++++----- misc/py-pytorch/files/patch-c10_core_DynamicCast.h | 12 +++++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile index cdf87794c265..6f43ace1e6ca 100644 --- a/misc/py-pytorch/Makefile +++ b/misc/py-pytorch/Makefile @@ -1,6 +1,7 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v DISTVERSION= 2.1.0 +PORTREVISION= 1 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/misc/py-pytorch/files/patch-CMakeLists.txt b/misc/py-pytorch/files/patch-CMakeLists.txt index 9ebebccbf2e3..4b319d3c9aac 100644 --- a/misc/py-pytorch/files/patch-CMakeLists.txt +++ b/misc/py-pytorch/files/patch-CMakeLists.txt @@ -1,6 +1,6 @@ ---- CMakeLists.txt.orig 2023-04-03 19:45:59 UTC +--- CMakeLists.txt.orig 2023-10-06 19:49:00 UTC +++ CMakeLists.txt -@@ -138,7 +138,7 @@ endif() +@@ -139,7 +139,7 @@ endif() set(CPU_AARCH64 OFF) set(CPU_INTEL OFF) @@ -9,7 +9,7 @@ set(CPU_INTEL ON) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)") set(CPU_AARCH64 ON) -@@ -163,7 +163,7 @@ include(CMakeDependentOption) +@@ -164,7 +164,7 @@ include(CMakeDependentOption) option(ATEN_NO_TEST "Do not build ATen test binaries" OFF) option(BUILD_BINARY "Build C++ binaries" OFF) option(BUILD_DOCS "Build Caffe2 documentation" OFF) @@ -18,7 +18,7 @@ option(BUILD_PYTHON "Build Python binaries" ON) option(BUILD_CAFFE2 "Master flag to build Caffe2" OFF) option(BUILD_LITE_INTERPRETER "Master flag to build Lite Interpreter" OFF) -@@ -398,15 +398,15 @@ endif() +@@ -408,15 +408,15 @@ endif() # USE_SYSTEM_LIBS being "OFF". option(USE_SYSTEM_LIBS "Use all available system-provided libraries." OFF) option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo." OFF) @@ -35,5 +35,5 @@ -option(USE_SYSTEM_ONNX "Use system-provided onnx." OFF) +option(USE_SYSTEM_ONNX "Use system-provided onnx." ON) option(USE_SYSTEM_XNNPACK "Use system-provided xnnpack." OFF) + option(USE_SYSTEM_ZSTD "Use system-provided zstd." OFF) option(USE_GOLD_LINKER "Use ld.gold to link" OFF) - if(USE_SYSTEM_LIBS) diff --git a/misc/py-pytorch/files/patch-c10_core_DynamicCast.h b/misc/py-pytorch/files/patch-c10_core_DynamicCast.h index 517085e8bdee..096c85f368f8 100644 --- a/misc/py-pytorch/files/patch-c10_core_DynamicCast.h +++ b/misc/py-pytorch/files/patch-c10_core_DynamicCast.h @@ -1,8 +1,18 @@ - workaround for the failuree diring math/dgl build: - /usr/local/lib/python3.9/site-packages/torch/include/c10/core/DynamicCast.h:112:22: error: use of undeclared identifier '__assert_fail' +- see https://github.com/pytorch/pytorch/issues/113941 ---- c10/core/DynamicCast.h.orig 2023-05-10 02:37:18 UTC +--- c10/core/DynamicCast.h.orig 2023-10-06 19:49:01 UTC +++ c10/core/DynamicCast.h +@@ -54,7 +54,7 @@ namespace c10 { + // + + #ifdef C10_HOST_DEVICE +-#define ERROR_UNSUPPORTED_CAST CUDA_KERNEL_ASSERT(false); ++#define ERROR_UNSUPPORTED_CAST assert(false); + #else + #define ERROR_UNSUPPORTED_CAST TORCH_CHECK(false, "Unexpected scalar type"); + #endif @@ -99,13 +99,13 @@ C10_HOST_DEVICE inline void cast_and_store( template <> \ C10_HOST_DEVICE inline T fetch_and_cast( \