Skip to content

Commit

Permalink
[hsakmt_roct] Add 5.5.1 (#7469)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsamaroo authored Oct 2, 2023
1 parent b7ff928 commit be0ecb7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
4 changes: 3 additions & 1 deletion H/hsakmt_roct/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const ROCM_TAGS = Dict(
v"4.2.0" => "7cdd63475c36bb9f49bb960f90f9a8cdb7e80a21",
v"4.5.2" => "3277d5354ed623598a5cea82cc3790a577af177c",
v"5.2.3" => "026fae434a141faa10da109a2c1b03dc9e06db3f",
v"5.4.4" => "2d55276bfa186a47611cdd2fc20879dacb506a9a")
v"5.4.4" => "2d55276bfa186a47611cdd2fc20879dacb506a9a",
v"5.5.1" => "695ec62187ba0708e3f8a960c2b75b877c2521a9",
)
const ROCM_PLATFORMS = [
Platform("x86_64", "linux"; libc="glibc", cxxstring_abi="cxx11"),
Platform("x86_64", "linux"; libc="musl", cxxstring_abi="cxx11"),
Expand Down
7 changes: 7 additions & 0 deletions H/hsakmt_roct/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Pkg
using BinaryBuilder

include("../common.jl")
build_tarballs(
ARGS, configure_build(v"5.5.1")...;
preferred_gcc_version=v"7", preferred_llvm_version=v"9", julia_compat="1.9")
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
commit ce1a2a876dabb5de81d1dcce507dda73d73d8991
Author: Julian P Samaroo <[email protected]>
Date: Sat Oct 3 15:27:40 2020 -0500

Build correctly on musl

diff --git a/src/libhsakmt.h b/src/libhsakmt.h
index 55fc5a4..470c4e6 100644
--- a/src/libhsakmt.h
+++ b/src/libhsakmt.h
@@ -31,6 +31,7 @@
#include <pthread.h>
#include <stdint.h>
#include <limits.h>
+#include <sys/param.h>

extern int kfd_fd;
extern unsigned long kfd_open_count;
@@ -56,6 +57,9 @@ extern HsaVersionInfo kfd_version_info;
do { if ((minor) > kfd_version_info.KernelInterfaceMinorVersion)\
return HSAKMT_STATUS_NOT_SUPPORTED; } while (0)

+#ifdef PAGE_SIZE
+#undef PAGE_SIZE
+#endif
extern int PAGE_SIZE;
extern int PAGE_SHIFT;

@@ -206,13 +210,17 @@ extern int kmtIoctl(int fd, unsigned long request, void *arg);
#define VOID_PTR_SUB(ptr,n) (void*)((uint8_t*)(ptr) - n)/*ptr - offset*/
#define VOID_PTRS_SUB(ptr1,ptr2) (uint64_t)((uint8_t*)(ptr1) - (uint8_t*)(ptr2)) /*ptr1 - ptr2*/

+#ifndef MIN
#define MIN(a, b) ({ \
typeof(a) tmp1 = (a), tmp2 = (b); \
tmp1 < tmp2 ? tmp1 : tmp2; })
+#endif

+#ifndef MIN
#define MAX(a, b) ({ \
typeof(a) tmp1 = (a), tmp2 = (b); \
tmp1 > tmp2 ? tmp1 : tmp2; })
+#endif

void clear_events_page(void);
void fmm_clear_all_mem(void);

0 comments on commit be0ecb7

Please sign in to comment.