Even when building without Kineto, the 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 a/torch/csrc/profiler/kineto_shim.h b/torch/csrc/profiler/kineto_shim.h index 7a3b788..7f49d18 100644 --- a/torch/csrc/profiler/kineto_shim.h +++ b/torch/csrc/profiler/kineto_shim.h @@ -12,7 +12,55 @@ #undef USE_KINETO #endif +#ifdef USE_KINETO #include +#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, + + 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 #include '>2024-05-25deduplication: Detect holes and create sparse files....This reduces disk usage of sparse files that are substituted such as Guile object files (ELF files). As of Guile 3.0.9, .go files are sparse due to ELF sections being aligned on 64 KiB boundaries. This reduces disk usage reported by “du -sh” by 9% for the ‘guix’ package, by 23% for ‘guile’, and by 35% for ‘guile-git’. * guix/store/deduplication.scm (hole-size, find-holes): New procedures. (tee)[seekable?]: New variable. [read!]: Add case when SEEKABLE? is true. * tests/store-deduplication.scm (cartesian-product): New procedure. ("copy-file/deduplicate, sparse files (holes: ~a/~a/~a)"): New test set. Change-Id: Iad2ab7830dcb1220e2026f4a127a6c718afa8964 Ludovic Courtès 2023-03-13guix: Strip #:use-module lists....This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused. Ludovic Courtès 2022-12-10deduplicate: Use 'sendfile' only with file ports....Fixes a regression introduced in b129026e2e242e9068158ae6e6fcd8d7c5ea092e. * guix/store/deduplication.scm (dump-file/deduplicate): Use 'sendfile' only when INPUT' is a file port. Ludovic Courtès 2022-12-10deduplicate: Use 'sendfile' for small file copies....* guix/store/deduplication.scm (dump-file/deduplicate): Use 'sendfile' instead of 'dump-port'. * tests/store-deduplication.scm ("copy-file/deduplicate, below %deduplication-minimum-size"): New test. Ludovic Courtès