head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.4 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.2 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.1.0.6 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.4 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.2 pkgsrc-2025Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2025.09.27.01.19.55; author ryoon; state Exp; branches; next 1.1; commitid QqI5cqSAR7gS3icG; 1.1 date 2025.01.21.13.36.49; author ryoon; state Exp; branches; next ; commitid w4AAm3mKQUAW8mGF; desc @@ 1.2 log @math/py-torch: Update to 2.8.0 Changelog: Too long and many changes are not related to CPU backend. @ text @$NetBSD: patch-third__party_kineto_libkineto_src_ThreadUtil.cpp,v 1.1 2025/01/21 13:36:49 ryoon Exp $ * Support NetBSD. --- third_party/kineto/libkineto/src/ThreadUtil.cpp.orig 2025-08-06 17:08:03.000000000 +0000 +++ third_party/kineto/libkineto/src/ThreadUtil.cpp @@@@ -27,6 +27,10 @@@@ #undef ERROR #endif // _WIN32 +#if defined(__NetBSD__) +#include +#endif + #ifdef __ANDROID__ #include #endif @@@@ -90,6 +94,8 @@@@ int32_t systemThreadId(bool cache) { syscall(SYS_thr_self, &sysTid); #elif defined _AIX sysTid = pthread_self(); +#elif defined __NetBSD__ + sysTid = (int32_t)_lwp_self(); #else sysTid = (int32_t)syscall(SYS_gettid); #endif @@@@ -161,6 +167,8 @@@@ bool setThreadName(const std::string& na return SUCCEEDED(hr); #elif defined _AIX return 0; +#elif defined(__NetBSD__) + return 0 == pthread_setname_np(pthread_self(), "thread_%s", const_cast(name.c_str())); #else return 0 == pthread_setname_np(pthread_self(), name.c_str()); #endif @ 1.1 log @math/py-torch: import py313-torch-2.5.1 PyTorch is a Python package that provides two high-level features: * Tensor computation (like NumPy) with strong GPU acceleration * Deep neural networks built on a tape-based autograd system @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- third_party/kineto/libkineto/src/ThreadUtil.cpp.orig 2024-10-29 18:00:46.000000000 +0000 d7 1 a7 1 @@@@ -23,6 +23,10 @@@@ d18 4 a21 4 @@@@ -58,6 +62,8 @@@@ int32_t systemThreadId() { _sysTid = (int32_t)GetCurrentThreadId(); #elif defined __FreeBSD__ syscall(SYS_thr_self, &_sysTid); d23 1 a23 1 + _sysTid = (int32_t)_lwp_self(); d25 1 a25 1 _sysTid = (int32_t)syscall(SYS_gettid); d27 1 a27 3 @@@@ -111,6 +117,8 @@@@ bool setThreadName(const std::string& na std::wstring wname = conv.from_bytes(name); HRESULT hr = _SetThreadDescription(GetCurrentThread(), wname.c_str()); d29 2 @