mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
* gnu/packages/machine-learning.scm (python-pytorch): Update to 2.8.0. [source]: Update hash. Update CUDA kernel deletion paths. [arguments]: Add BUILD_TEST=0. Fix concurrentqueue includes. Fix sympy version constraint. Fix nccl skip phase. [inputs]: Add concurrentqueue and rdma-core. * gnu/packages/patches/python-pytorch-system-libraries.patch: Update for 2.8.0. * gnu/packages/patches/python-pytorch-fix-codegen.patch: Update for 2.8.0. * gnu/packages/patches/python-pytorch-without-kineto.patch: Update for 2.8.0. Change-Id: I237913636dfeaa7eb19f7d71516fd05c86373f28 Reviewed-by: David Elsing <david.elsing@posteo.net> @dtelsing Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
Even when building without Kineto, the <ActivityType.h> header is still
|
|
imported and the ActivityType type is used. This patch was copied from
|
|
https://github.com/pytorch/pytorch/pull/111048 and adapted.
|
|
|
|
diff --git i/torch/csrc/profiler/kineto_shim.h w/torch/csrc/profiler/kineto_shim.h
|
|
index c4efd7785b7..20cc657961c 100644
|
|
--- i/torch/csrc/profiler/kineto_shim.h
|
|
+++ w/torch/csrc/profiler/kineto_shim.h
|
|
@@ -12,7 +12,56 @@
|
|
#undef USE_KINETO
|
|
#endif
|
|
|
|
+#ifdef USE_KINETO
|
|
#include <ActivityType.h>
|
|
+#else
|
|
+namespace libkineto {
|
|
+// copied from header
|
|
+/*
|
|
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
+ * All rights reserved.
|
|
+ *
|
|
+ * This source code is licensed under the BSD-style license found in the
|
|
+ * LICENSE file in the root directory of this source tree.
|
|
+ */
|
|
+
|
|
+// Note : All activity types are not enabled by default. Please add them
|
|
+// at correct position in the enum
|
|
+enum class ActivityType {
|
|
+ // Activity types enabled by default
|
|
+ CPU_OP = 0, // cpu side ops
|
|
+ USER_ANNOTATION,
|
|
+ GPU_USER_ANNOTATION,
|
|
+ GPU_MEMCPY,
|
|
+ GPU_MEMSET,
|
|
+ CONCURRENT_KERNEL, // on-device kernels
|
|
+ EXTERNAL_CORRELATION,
|
|
+ CUDA_RUNTIME, // host side cuda runtime events
|
|
+ CUDA_DRIVER, // host side cuda driver events
|
|
+ CPU_INSTANT_EVENT, // host side point-like events
|
|
+ PYTHON_FUNCTION,
|
|
+ OVERHEAD, // CUPTI induced overhead events sampled from its overhead API.
|
|
+
|
|
+ // Optional Activity types
|
|
+ CUDA_SYNC, // synchronization events between runtime and kernels
|
|
+ GLOW_RUNTIME, // host side glow runtime events
|
|
+ MTIA_RUNTIME, // host side MTIA runtime events
|
|
+ CUDA_PROFILER_RANGE, // CUPTI Profiler range for performance metrics
|
|
+ MTIA_CCP_EVENTS, // MTIA ondevice CCP events
|
|
+ HPU_OP, // HPU host side runtime event
|
|
+ XPU_RUNTIME, // host side xpu runtime events
|
|
+ MTIA_WORKLOADD,
|
|
+ MTIA_INSIGHT, // MTIA insight events (new in 2.8.0)
|
|
+
|
|
+ PRIVATEUSE1_RUNTIME,
|
|
+ PRIVATEUSE1_DRIVER,
|
|
+
|
|
+ ENUM_COUNT, // This is to add buffer and not used for any profiling logic. Add your new type before it.
|
|
+ OPTIONAL_ACTIVITY_TYPE_START = CUDA_SYNC,
|
|
+};
|
|
+}
|
|
+
|
|
+#endif
|
|
|
|
#include <torch/csrc/Export.h>
|
|
#include <torch/csrc/profiler/api.h>
|