Skip to content

Commit 1641f9c

Browse files
malfetpobin6
authored and
pobin6
committed
[MPS][BE] Add virtual destructor (pytorch#141476)
As classes with virtual methods must have virtual destructors Pull Request resolved: pytorch#141476 Approved by: https://github.com/cyyever, https://github.com/Skylion007 ghstack dependencies: pytorch#141474, pytorch#141475
1 parent d40e910 commit 1641f9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

aten/src/ATen/native/mps/MetalShaderLibrary.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class MetalShaderLibrary {
1818
nparams(nparams_),
1919
compile_options(compile_options_) {}
2020
MetalShaderLibrary(const MetalShaderLibrary&) = delete;
21+
virtual ~MetalShaderLibrary() = default;
2122
inline id<MTLComputePipelineState> getPipelineStateForFunc(
2223
const std::string& fname) {
2324
return getLibraryPipelineState(getLibrary(), fname).first;

0 commit comments

Comments
 (0)