mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
thrustallocator is not needed since cub is used directly for gather now. (#3683)
Co-authored-by: Weixing Zhang <wezhan@microsoft.com>
This commit is contained in:
parent
c929963d74
commit
2f8a17dcde
2 changed files with 0 additions and 31 deletions
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "orttraining/training_ops/cuda/tensor/gather_grad.h"
|
||||
#include "orttraining/training_ops/cuda/tensor/gather_grad_impl.h"
|
||||
#include "orttraining/training_ops/cuda/tensor/thrustallocator.h"
|
||||
#include "core/providers/common.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/framework/allocator.h"
|
||||
|
||||
namespace onnxruntime {
|
||||
namespace cuda {
|
||||
|
||||
class ThrustAllocator {
|
||||
public:
|
||||
typedef char value_type;
|
||||
|
||||
ThrustAllocator(IAllocator* alloc) : alloc_(alloc) {}
|
||||
|
||||
char* allocate(std::ptrdiff_t size) {
|
||||
return static_cast<char*>(alloc_->Alloc(size));
|
||||
}
|
||||
|
||||
void deallocate(char* p, size_t /*size*/) {
|
||||
alloc_->Free(p);
|
||||
}
|
||||
|
||||
private:
|
||||
IAllocator* alloc_;
|
||||
};
|
||||
|
||||
} // namespace cuda
|
||||
} // namespace onnxruntime
|
||||
Loading…
Reference in a new issue