ucx: improve pacth (#4481)

* ucx: improve pacth

* Update xmake.lua
pull/4482/head
star9029 5 months ago committed by GitHub
parent c472fa4687
commit 5cb6fb3d3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 31
      packages/u/ucx/patches/1.16.0/unused_variable.patch
  2. 12
      packages/u/ucx/xmake.lua

@ -0,0 +1,31 @@
From 98496827bef6f4619a4a8058443f61ef78b8ab72 Mon Sep 17 00:00:00 2001
From: Roie Danino <rdanino@nvidia.com>
Date: Wed, 7 Feb 2024 14:23:45 +0200
Subject: [PATCH] UCM/PTMALLOC286: added UCS_V_UNUSED attribute to nfences
which might be unused in release
---
src/ucm/ptmalloc286/malloc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ucm/ptmalloc286/malloc.c b/src/ucm/ptmalloc286/malloc.c
index e1779967885..45c1aaf8ff3 100644
--- a/src/ucm/ptmalloc286/malloc.c
+++ b/src/ucm/ptmalloc286/malloc.c
@@ -526,6 +526,7 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
#endif
#include <ucs/sys/preprocessor.h>
+#include <ucs/sys/compiler_def.h>
/* Version identifier to allow people to support multiple versions */
#ifndef DLMALLOC_VERSION
@@ -3997,7 +3998,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
msegmentptr ss = (msegmentptr)(chunk2mem(sp));
mchunkptr tnext = chunk_plus_offset(sp, ssize);
mchunkptr p = tnext;
- int nfences = 0;
+ int UCS_V_UNUSED nfences = 0;
/* reset top to new space */
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);

@ -1,27 +1,27 @@
package("ucx")
set_homepage("https://openucx.org/")
set_description("Unified Communication X")
set_license("BSD-3-Clause")
add_urls("https://github.com/openucx/ucx/releases/download/v$(version)/ucx-$(version).tar.gz")
add_urls("https://github.com/openucx/ucx/releases/download/v$(version)/ucx-$(version).tar.gz",
"https://github.com/openucx/ucx.git")
add_versions("1.17.0", "34658e282f99f89ce7a991c542e9727552734ac6ad408c52f22b4c2653b04276")
add_versions("1.16.0", "f73770d3b583c91aba5fb07557e655ead0786e057018bfe42f0ebe8716e9d28c")
add_versions("1.15.0", "4b202087076bc1c98f9249144f0c277a8ea88ad4ca6f404f94baa9cb3aebda6d")
add_versions("1.11.0", "b7189b69fe0e16e3c03784ef674e45687a9c520750bd74a45125c460ede37647")
add_patches("1.16.0", "patches/1.16.0/unused_variable.patch", "dd40219cf1989cd42ea19f334ea5c3e4e57736bcbad62fa6741f00a1bb89f0fc")
add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"})
on_load("linux", function (package)
on_load(function (package)
if package:config("cuda") then
package:add("deps", "cuda")
end
end)
on_install("linux", function (package)
-- Already fixed in the upstream, please remove it in the next release.
-- https://github.com/openucx/ucx/commit/98496827bef6f4619a4a8058443f61ef78b8ab72
io.replace("src/ucm/ptmalloc286/malloc.c", "int nfences = 0;", "int __attribute__((unused)) nfences = 0;")
local configs = {"--disable-doxygen-doc", "--without-go", "--without-java", "--without-rte", "--without-fuse3", "--without-gdrcopy", "--without-rdmacm", "--without-knem", "--without-xpmem", "--without-ugni"}
if package:config("cuda") then
local cuda = package:dep("cuda"):fetch()

Loading…
Cancel
Save