mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Fixes https://github.com/pytorch/pytorch/issues/16860 Pull Request resolved: https://github.com/pytorch/pytorch/pull/17317 Differential Revision: D14157877 Pulled By: zdevito fbshipit-source-id: c37aec2d77c2e637d4fc6ceffe2bd32901c70317
30 lines
490 B
C++
30 lines
490 B
C++
#pragma once
|
|
|
|
#include <c10/util/Exception.h>
|
|
#include <torch/csrc/utils/disallow_copy.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
namespace fuser {
|
|
namespace cpu {
|
|
|
|
struct DynamicLibrary {
|
|
TH_DISALLOW_COPY_AND_ASSIGN(DynamicLibrary);
|
|
|
|
DynamicLibrary(const char* name);
|
|
|
|
void* sym(const char* name);
|
|
|
|
~DynamicLibrary();
|
|
|
|
static std::string directoryOf(void* addr);
|
|
|
|
private:
|
|
void* handle = nullptr;
|
|
};
|
|
|
|
} // namespace cpu
|
|
} // namespace fuser
|
|
} // namespace jit
|
|
} // namespace torch
|