1 |
commit: f383941f269d7e5f800ddddd4fde16a3ac00ea50 |
2 |
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 05:38:17 2022 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 05:38:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f383941f |
7 |
|
8 |
sci-libs/kineto: add to tree |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
12 |
|
13 |
sci-libs/kineto/Manifest | 1 + |
14 |
.../kineto/files/kineto-2021.11.17-gentoo.patch | 77 ++++++++++++++++++++++ |
15 |
sci-libs/kineto/kineto-2021.11.17.ebuild | 42 ++++++++++++ |
16 |
sci-libs/kineto/metadata.xml | 11 ++++ |
17 |
4 files changed, 131 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/kineto/Manifest b/sci-libs/kineto/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000000..f95e98c70918 |
22 |
--- /dev/null |
23 |
+++ b/sci-libs/kineto/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST kineto-2021.11.17.tar.gz 7497956 BLAKE2B b15573ab63ed0f2e09658a2d7fdd0746a659eb61ca48e996ef471f56af0be3a2778be8c1e93af69efe9d35e52090711ea7cce433988fa3ef1b7c9be8087bfda6 SHA512 bf237e66e44da9fbdf90e7bbf347ae68453cebb3c34c753472eeeeca27d22c0fa1e672dc148ec6394108146d10d1ee77d420cdc2397902fe457aa085643b9714 |
26 |
|
27 |
diff --git a/sci-libs/kineto/files/kineto-2021.11.17-gentoo.patch b/sci-libs/kineto/files/kineto-2021.11.17-gentoo.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..0c4cb7261273 |
30 |
--- /dev/null |
31 |
+++ b/sci-libs/kineto/files/kineto-2021.11.17-gentoo.patch |
32 |
@@ -0,0 +1,77 @@ |
33 |
+--- a/libkineto/CMakeLists.txt 2022-05-24 11:16:18.537610972 +0200 |
34 |
++++ b/libkineto/CMakeLists.txt 2022-05-24 11:19:15.011073535 +0200 |
35 |
+@@ -78,10 +78,10 @@ |
36 |
+ set_target_properties(kineto_base kineto_api PROPERTIES |
37 |
+ CXX_STANDARD 14 |
38 |
+ CXX_STANDARD_REQUIRED YES |
39 |
+- CXX_EXTENSIONS NO |
40 |
+- CXX_VISIBILITY_PRESET hidden) |
41 |
++ CXX_EXTENSIONS NO) |
42 |
+ |
43 |
+-set(KINETO_COMPILE_OPTIONS "-DKINETO_NAMESPACE=libkineto") |
44 |
++set(KINETO_COMPILE_OPTIONS "-DKINETO_NAMESPACE=libkineto" |
45 |
++ ${CMAKE_SHARED_LIBRARY_C_FLAGS}) |
46 |
+ list(APPEND KINETO_COMPILE_OPTIONS "-DFMT_HEADER_ONLY") |
47 |
+ if(NOT MSVC) |
48 |
+ list(APPEND KINETO_COMPILE_OPTIONS "-std=c++14") |
49 |
+@@ -100,7 +102,7 @@ |
50 |
+ target_compile_options(kineto_base PRIVATE "${KINETO_COMPILE_OPTIONS}") |
51 |
+ target_compile_options(kineto_api PRIVATE "${KINETO_COMPILE_OPTIONS}") |
52 |
+ |
53 |
+-if(NOT TARGET fmt) |
54 |
++if(FALSE) |
55 |
+ if(NOT FMT_SOURCE_DIR) |
56 |
+ set(FMT_SOURCE_DIR "${LIBKINETO_THIRDPARTY_DIR}/fmt" |
57 |
+ CACHE STRING "fmt source directory from submodules") |
58 |
+@@ -118,9 +120,7 @@ |
59 |
+ set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE) |
60 |
+ endif() |
61 |
+ |
62 |
+-set(FMT_INCLUDE_DIR "${FMT_SOURCE_DIR}/include") |
63 |
+ message(STATUS "Kineto: FMT_SOURCE_DIR = ${FMT_SOURCE_DIR}") |
64 |
+-message(STATUS "Kineto: FMT_INCLUDE_DIR = ${FMT_INCLUDE_DIR}") |
65 |
+ if (NOT CUPTI_INCLUDE_DIR) |
66 |
+ set(CUPTI_INCLUDE_DIR "${CUDA_SOURCE_DIR}/extras/CUPTI/include") |
67 |
+ endif() |
68 |
+@@ -140,14 +140,12 @@ |
69 |
+ target_include_directories(kineto_base PUBLIC |
70 |
+ $<BUILD_INTERFACE:${LIBKINETO_INCLUDE_DIR}> |
71 |
+ $<BUILD_INTERFACE:${LIBKINETO_SOURCE_DIR}> |
72 |
+- $<BUILD_INTERFACE:${FMT_INCLUDE_DIR}> |
73 |
+ $<BUILD_INTERFACE:${CUPTI_INCLUDE_DIR}> |
74 |
+ $<BUILD_INTERFACE:${CUDA_INCLUDE_DIRS}> |
75 |
+ $<BUILD_INTERFACE:${ROCTRACER_INCLUDE_DIR}> |
76 |
+ $<BUILD_INTERFACE:${ROCM_INCLUDE_DIRS}>) |
77 |
+ |
78 |
+ target_include_directories(kineto_api PUBLIC |
79 |
+- $<BUILD_INTERFACE:${FMT_INCLUDE_DIR}> |
80 |
+ $<BUILD_INTERFACE:${LIBKINETO_INCLUDE_DIR}>) |
81 |
+ |
82 |
+ if(KINETO_LIBRARY_TYPE STREQUAL "default") |
83 |
+@@ -178,8 +180,6 @@ |
84 |
+ if(NOT LIBKINETO_NOCUPTI) |
85 |
+ target_link_libraries(kineto "${CUDA_cupti_LIBRARY}") |
86 |
+ endif() |
87 |
+-target_link_libraries(kineto $<BUILD_INTERFACE:fmt::fmt-header-only>) |
88 |
+-add_dependencies(kineto fmt::fmt-header-only) |
89 |
+ |
90 |
+ install(TARGETS kineto EXPORT kinetoLibraryConfig |
91 |
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
92 |
+--- a/libkineto/libkineto_defs.bzl 2022-05-24 22:06:17.324000422 +0200 |
93 |
++++ b/libkineto/libkineto_defs.bzl 2022-05-24 22:07:08.326419268 +0200 |
94 |
+@@ -46,6 +46,7 @@ |
95 |
+ "src/init.cpp", |
96 |
+ "src/output_csv.cpp", |
97 |
+ "src/output_json.cpp", |
98 |
++ "src/ILoggerObserver.cpp", |
99 |
+ ] + (get_libkineto_api_srcs() if with_api else []) |
100 |
+ |
101 |
+ def get_libkineto_public_headers(): |
102 |
+@@ -51,6 +56,7 @@ |
103 |
+ return [ |
104 |
+ "include/AbstractConfig.h", |
105 |
+ "include/ActivityProfilerInterface.h", |
106 |
++ "include/ActivityTraceInterface.h", |
107 |
+ "include/ActivityType.h", |
108 |
+ "include/Config.h", |
109 |
+ "include/ClientInterface.h", |
110 |
|
111 |
diff --git a/sci-libs/kineto/kineto-2021.11.17.ebuild b/sci-libs/kineto/kineto-2021.11.17.ebuild |
112 |
new file mode 100644 |
113 |
index 000000000000..4a2841c7a5a9 |
114 |
--- /dev/null |
115 |
+++ b/sci-libs/kineto/kineto-2021.11.17.ebuild |
116 |
@@ -0,0 +1,42 @@ |
117 |
+# Copyright 2022 Gentoo Authors |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=8 |
121 |
+ |
122 |
+PYTHON_COMPAT=( python3_{8..11} ) |
123 |
+inherit python-any-r1 cmake |
124 |
+ |
125 |
+CommitId=659a7f99ee737103273ef60551bfe1611c2d2cba |
126 |
+ |
127 |
+DESCRIPTION="part of the PyTorch Profiler" |
128 |
+HOMEPAGE="https://github.com/pytorch/kineto" |
129 |
+SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz |
130 |
+ -> ${P}.tar.gz" |
131 |
+ |
132 |
+LICENSE="BSD" |
133 |
+SLOT="0" |
134 |
+KEYWORDS="~amd64" |
135 |
+IUSE="test" |
136 |
+ |
137 |
+RDEPEND=" |
138 |
+ dev-libs/libfmt |
139 |
+" |
140 |
+DEPEND="${RDEPEND}" |
141 |
+BDEPEND=" |
142 |
+ test? ( dev-cpp/gtest ) |
143 |
+ ${PYTHON_DEPS} |
144 |
+" |
145 |
+RESTRICT="!test? ( test )" |
146 |
+ |
147 |
+S="${WORKDIR}"/${PN}-${CommitId} |
148 |
+ |
149 |
+src_prepare() { |
150 |
+ eapply "${FILESDIR}"/${P}-gentoo.patch |
151 |
+ cd libkineto |
152 |
+ cmake_src_prepare |
153 |
+} |
154 |
+ |
155 |
+src_configure() { |
156 |
+ cd libkineto |
157 |
+ cmake_src_configure |
158 |
+} |
159 |
|
160 |
diff --git a/sci-libs/kineto/metadata.xml b/sci-libs/kineto/metadata.xml |
161 |
new file mode 100644 |
162 |
index 000000000000..9d79d73e5c54 |
163 |
--- /dev/null |
164 |
+++ b/sci-libs/kineto/metadata.xml |
165 |
@@ -0,0 +1,11 @@ |
166 |
+<?xml version="1.0" encoding="UTF-8"?> |
167 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
168 |
+<pkgmetadata> |
169 |
+ <maintainer type="person"> |
170 |
+ <email>tupone@g.o</email> |
171 |
+ <name>Tupone Alfredo</name> |
172 |
+ </maintainer> |
173 |
+ <upstream> |
174 |
+ <remote-id type="github">pytorch/kineto</remote-id> |
175 |
+ </upstream> |
176 |
+</pkgmetadata> |