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:
Weixing Zhang 2020-04-24 01:51:54 -07:00 committed by GitHub
parent c929963d74
commit 2f8a17dcde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 31 deletions

View file

@ -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 {

View file

@ -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