mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Stupid fixes
This commit is contained in:
parent
85e5fddd2a
commit
b4b6c4fac2
1 changed files with 15 additions and 3 deletions
|
|
@ -13,10 +13,22 @@
|
|||
#include "core/providers/cpu/tensor/onehot.h"
|
||||
#include "core/providers/cpu/tensor/gather_elements.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
// The ROCM version of this just deletes on destruction, but is drop in compatible with the regular DeleteOnUnloadPtr
|
||||
template <typename T>
|
||||
using DeleteOnUnloadPtr = std::unique_ptr<T>;
|
||||
}
|
||||
struct DeleteOnUnloadPtr {
|
||||
DeleteOnUnloadPtr(T* p) : p_(p) { }
|
||||
~DeleteOnUnloadPtr() { delete p; }
|
||||
|
||||
T& operator*() { return *p_; }
|
||||
const T& operator*() const { return *p_; }
|
||||
|
||||
operator T*() {
|
||||
return p_;
|
||||
}
|
||||
|
||||
private:
|
||||
T* p_;
|
||||
};
|
||||
#else
|
||||
#define SHARED_PROVIDER 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue