Skip to content

Commit ececbcf

Browse files
malfetfacebook-github-bot
authored andcommitted
[Conda][Kineto] efine weak acc_get_device_type if kineto is used (pytorch#51818)
Summary: Pull Request resolved: pytorch#51818 Reviewed By: ilia-cher Differential Revision: D26291188 Pulled By: malfet fbshipit-source-id: 68797e02fe4dd54d8030e67aaf28046a4fae0770
1 parent fb07aca commit ececbcf

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

torch/csrc/autograd/profiler_kineto.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313

1414
// TODO: TO be removed, once this properly works from libkineto
1515
// Literal copy-n-paste from third_party/kineto/libkineto/src/WeakSymbols.cpp
16-
#ifdef USE_CUDA
1716
extern "C" {
1817
// This function is needed to avoid superfluous dependency on GNU OpenMP library when cuPTI is linked statically
1918
// For more details see https://github.com/pytorch/pytorch/issues/51026
2019
__attribute__((weak)) int acc_get_device_type() {
2120
throw std::runtime_error("Dummy implementation of acc_get_device_type is not supposed to be called!");
2221
}
2322
} // extern "C"
24-
#endif /* USE_CUDA */
2523

2624
namespace torch { namespace autograd { namespace profiler {
2725

0 commit comments

Comments
 (0)