cuda stringlengths 84 3.33k | hip stringlengths 140 3.32k |
|---|---|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/reduction/all_impl.h"
#include <thrust/logical.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
#ifdef _WIN32
#pragma warning(disable : 4244)
#endif
namespace... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/reduction/all_impl.h"
#include <thrust/logical.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
#ifdef _WIN32
#pragma warning(dis... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename T>
void LaunchAllKernel(cudaStream_t stream, const T* data, const int size, bool* output);
}
} // namespace onnxruntime
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_runtime.h>
namespace onnxruntime {
namespace rocm {
template <typename T>
void LaunchAllKernel(hipStream_t stream, const T* data, const int size, bool* output);
}
} // namespace onnxruntim... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename TIn, typename TOut>
class ReduceAllL2 final : public CudaKernel {
public:
ReduceAllL2(const OpKerne... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename TIn, typename TOut>
class ReduceAllL2 final : public RocmKernel {
public:
ReduceAllL2(const OpKerne... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
#include "core/providers/cuda/multi_tensor/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typename TIn, typename TOut>
struct MultiTensorReduceL2 {
void operator()... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_runtime.h>
#include "core/providers/rocm/multi_tensor/common.cuh"
namespace onnxruntime {
namespace rocm {
template <typename TIn, typename TOut>
struct MultiTensorReduceL2 {
void operato... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/optional.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/reduction/reduction_ops.h"
#include "core/providers/cuda/reduction/reduction_functions.h"
namespace... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/optional.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/reduction/reduction_ops.h"
#include "core/providers/rocm/reduction/reduction_functions.h"
namespace... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/concatbase.h"
namespace onnxruntime {
namespace cuda {
class ConcatTraining final : public CudaKernel, public ConcatBase {
pub... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/concatbase.h"
namespace onnxruntime {
namespace rocm {
class ConcatTraining final : public RocmKernel, public ConcatBase {
pub... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <bool inputk>
class TopK final : public CudaKernel {
public:
TopK(const OpKernelInfo&);
Status ComputeInter... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <bool inputk>
class TopK final : public RocmKernel {
public:
TopK(const OpKernelInfo&);
Status ComputeInter... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class GatherElementsGrad final : public CudaKernel {
public:
GatherElementsGrad(const ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class GatherElementsGrad final : public RocmKernel {
public:
GatherElementsGrad(const ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
struct GatherScatterElementsArgs;
template <typename T, typename TIndex>
Status GatherEle... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
struct GatherScatterElementsArgs;
template <typename T, typename TIndex>
Status GatherEle... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class GatherGrad final : public CudaKernel {
public:
GatherGrad(const OpKernelInfo& info) : CudaKernel(info) {
ORT_ENFORCE(info... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class GatherGrad final : public RocmKernel {
public:
GatherGrad(const OpKernelInfo& info) : RocmKernel(info) {
ORT_ENFORCE(info... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/framework/stream_handles.h"
namespace onnxruntime {
namespace cuda {
cla... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/framework/stream_handles.h"
namespace onnxruntime {
namespace rocm {
cla... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/tensor/gather_nd.h"
namespace onnxruntime {
namespace cuda {
template <typename Tind>
class GatherNDGrad final : public GatherNDBase {
public:
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/tensor/gather_nd.h"
namespace onnxruntime {
namespace rocm {
template <typename Tind>
class GatherNDGrad final : public GatherNDBase {
public:
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef _WIN32
#pragma warning(disable : 4244)
#endif
#include "orttraining/training_ops/cuda/tensor/gather_nd_grad_impl.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "core/providers/cuda/atomic/common.cuh"
... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef _WIN32
#pragma warning(disable : 4244)
#endif
#include "orttraining/training_ops/rocm/tensor/gather_nd_grad_impl.h"
#include "core/providers/rocm/cu_inc/common.cuh"
#include "core/provid... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename T>
void GatherNDGradImpl(
cudaStream_t stream,
const size_t num_slices,
const void* upda... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include <hip/hip_runtime.h>
namespace onnxruntime {
namespace rocm {
template <typename T>
void GatherNDGradImpl(
hipStream_t stream,
const size_t num_slices,
const void* up... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/tensor/slice_grad.h"
#include "core/providers/cpu/tensor/utils.h"
#include "core/providers/cuda/tensor/slice_impl.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_E... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/tensor/slice_grad.h"
#include "core/providers/cpu/tensor/utils.h"
#include "core/providers/rocm/tensor/slice_impl.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_E... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/tensor/slice.h"
namespace onnxruntime {
namespace cuda {
class SliceGrad final : public Slice<true> {
public:
SliceGrad(const OpKernelInfo& info) : Slice(info) {}
private:
const Tenso... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/tensor/slice.h"
namespace onnxruntime {
namespace rocm {
class SliceGrad final : public Slice<true> {
public:
SliceGrad(const OpKernelInfo& info) : Slice(info) {}
private:
const Tenso... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/split.h"
#include "orttraining/training_ops/cpu/tensor/split.h"
namespace onnxruntime {
namespace cuda {
cl... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/split.h"
#include "orttraining/training_ops/cpu/tensor/split.h"
namespace onnxruntime {
namespace rocm {
cl... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace cuda {
template <type... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace rocm {
template <type... |
#include "orttraining/training_ops/cuda/tensor/view.h"
namespace onnxruntime {
namespace cuda {
namespace {
constexpr int view_count_limit = 1024;
std::vector<std::pair<int, int>> GenerateAliasMapping() {
std::vector<std::pair<int, int>> alias_pairs{};
for (int i = 0; i < view_count_limit; ++i) {
alias_pairs.em... |
#include "orttraining/training_ops/rocm/tensor/view.h"
namespace onnxruntime {
namespace rocm {
namespace {
constexpr int view_count_limit = 1024;
std::vector<std::pair<int, int>> GenerateAliasMapping() {
std::vector<std::pair<int, int>> alias_pairs{};
for (int i = 0; i < view_count_limit; ++i) {
alias_pairs.em... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class View final : public CudaKernel {
public:
View(const OpKernelInfo& info) : CudaK... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class View final : public RocmKernel {
public:
View(const OpKernelInfo& info) : RocmK... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_TORCH_INTEROP
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/core/framework/torch/refcount_tracker.h"
#include "orttraining/training_ops/cuda/torch/torch_custom_functi... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_TORCH_INTEROP
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/core/framework/torch/refcount_tracker.h"
#include "orttraining/training_ops/rocm/torch/torch_custom_functi... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_TORCH_INTEROP
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "orttraining/training_ops/cpu/torch/torch_custom_function_kernel_base.h"
namespace onnxruntime {
namespace cuda {
/... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_TORCH_INTEROP
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "orttraining/training_ops/cpu/torch/torch_custom_function_kernel_base.h"
namespace onnxruntime {
namespace rocm {
/... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE MLFloat16
#include "topk_impl.cuh"
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE MLFloat16
#include "topk_impl.cuh"
### |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE float
#include "topk_impl.cuh"
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE float
#include "topk_impl.cuh"
### |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
#ifdef USE_ROCM
constexpr int kElementsPerThread = 2;
constexpr int kThreadsPerBlock = 512;
#else
constexpr int kEle... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespace rocm {
#ifdef USE_ROCM
constexpr int kElementsPerThread = 2;
constexpr int kThreadsPerBlock = ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE double
#include "topk_impl.cuh"
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE double
#include "topk_impl.cuh"
### |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE int32_t
#include "topk_impl.cuh"
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE int32_t
#include "topk_impl.cuh"
### |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE int64_t
#include "topk_impl.cuh"
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#define TOPK_IMPL_TYPE int64_t
#include "topk_impl.cuh"
### |
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
struct UnaryElementwisePreparation {
const Tensor* input_tensor = nullptr;
Tensor* output_tensor = nullptr;
};
class UnaryElementwise : public CudaKernel {
protected:
UnaryElementwise(const OpKernelInfo& info) : Cu... |
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
struct UnaryElementwisePreparation {
const Tensor* input_tensor = nullptr;
Tensor* output_tensor = nullptr;
};
class UnaryElementwise : public RocmKernel {
protected:
UnaryElementwise(const OpKernelInfo& info) : Ro... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <functional>
#include <vector>
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
using InputTensorVector = std::vector<std::reference_wrapper<const Tensor>>;
t... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <functional>
#include <vector>
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
using InputTensorVector = std::vector<std::reference_wrapper<const Tensor>>;
t... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename T, typename VariadicElementwiseOpTag>
void Impl_General(
cudaStream... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename T, typename VariadicElementwiseOpTag>
void Impl_General(
hipStream_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
namespace cuda {
namespace variadic_elementwise_ops {
struct Sum {};
struct Min {};
struct Max {};
} // namespace variadic_elementwise_ops
} // namespace cuda
} // namespace onnxrun... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
namespace rocm {
namespace variadic_elementwise_ops {
struct Sum {};
struct Min {};
struct Max {};
} // namespace variadic_elementwise_ops
} // namespace rocm
} // namespace onnxrun... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cuda/cudnn_common.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class BatchNorm final : public CudaKernel {
public:... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/rocm/miopen_common.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class BatchNorm final : public RocmKernel {
public... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/common.h"
#include "core/framework/random_generator.h"
namespace onnxruntime {
namespace cuda {
template <bool UseBitmask>
class Dropout... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/common.h"
#include "core/framework/random_generator.h"
namespace onnxruntime {
namespace rocm {
template <bool UseBitmask>
class Dropout... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/random_generator.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
void DropoutKernelImpl(const cudaDeviceProp& prop, cudaStream_t stream, const int64_t N,
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/random_generator.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
void DropoutKernelImpl(const hipDeviceProp_t& prop, hipStream_t stream, const int64_t N,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typename InT, typename OutT, typ... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespace rocm {
template <typ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cuda/cudnn_common.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class InstanceNorm final : public CudaKernel {
publ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/rocm/miopen_common.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class InstanceNorm final : public RocmKernel {
pub... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cu_inc/common.cuh"
#include "instance_norm_impl.h"
namespace onnxruntime {
namespace cuda {
template <typename T1, typename T2>
__global__ void _InstanceNormKernel(
const T1* __restrict_... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/cu_inc/common.cuh"
#include "instance_norm_impl.h"
namespace onnxruntime {
namespace rocm {
template <typename T1, typename T2>
__global__ void _InstanceNormKern... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/shared_inc/fast_divmod.h"
namespace onnxruntime {
namespace cuda {
template <typename T1, typename T2>
void InstanceNormImpl(
cudaStream_t stream,
const T1* input_data,
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/shared_inc/fast_divmod.h"
namespace onnxruntime {
namespace rocm {
template <typename T1, typename T2>
void InstanceNormImpl(
hipStream_t stream,
const T1* input_data,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
using namespace onnxruntime::cuda;
// NOTE: This was originally a contrib op with 3 type constraints. The ONNX spec merg... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
using namespace onnxruntime::rocm;
// NOTE: This was originally a contrib op with 3 type constraints. The ONNX spec merg... |
/**
* Copyright (c) 2016-present, Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | /**
* Copyright (c) 2016-present, Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cuda/cudnn_common.h"
namespace onnxruntime {
namespace cuda {
class CudnnLRNDescriptor final {
public:
CudnnLRNDescriptor();
~Cudnn... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/rocm/miopen_common.h"
namespace onnxruntime {
namespace rocm {
class MiopenLRNDescriptor final {
public:
MiopenLRNDescriptor();
~Mi... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <vector>
#include "core/framework/tensor_shape.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
void MaxPoolWithIndex(
cudaStream_t stream,
const TensorShape& input_shape,
const Tens... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <vector>
#include "core/framework/tensor_shape.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
void MaxPoolWithIndex(
hipStream_t stream,
const TensorShape& input_shape,
const Tenso... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "shrink.h"
#include "shrink_impl.h"
#include "core/providers/common.h"
using namespace std;
namespace onnxruntime {
namespace cuda {
#define SHRINK_REGISTER_KERNEL(T) \
ONNX_OPE... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "shrink.h"
#include "shrink_impl.h"
#include "core/providers/common.h"
using namespace std;
namespace onnxruntime {
namespace rocm {
#define SHRINK_REGISTER_KERNEL(T) \
ONNX_OPE... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class Shrink final : public CudaKernel {
public:
Shrink(const OpKernelInfo& info) : CudaKernel(... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class Shrink final : public RocmKernel {
public:
Shrink(const OpKernelInfo& info) : RocmKernel(... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cu_inc/common.cuh"
#include "shrink_impl.h"
namespace onnxruntime {
namespace cuda {
// Generic implementation of Shrink
template <typename T>
__global__ void _ShrinkKernel(
const T* inp... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/cu_inc/common.cuh"
#include "shrink_impl.h"
namespace onnxruntime {
namespace rocm {
// Generic implementation of Shrink
template <typename T>
__global__ void _S... |
#pragma once
#include "core/providers/cuda/cu_inc/common.cuh"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <
typename T, typename Func,
int32_t max_input_batch_size, int32_t num_elements_per_thread>
__global__ void VariadicElementWiseNoBroadcastInp... | #include "hip/hip_runtime.h"
#pragma once
#include "core/providers/rocm/cu_inc/common.cuh"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <
typename T, typename Func,
int32_t max_input_batch_size, int32_t num_elements_per_thread>
__global__ void Vari... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
namespace cuda {
template <typename T>
void ShrinkImpl(
cudaStream_t stream,
const T* input_data,
const float bias,
const float lambda,
T* output_data,
size_t ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
namespace rocm {
template <typename T>
void ShrinkImpl(
hipStream_t stream,
const T* input_data,
const float bias,
const float lambda,
T* output_data,
size_t c... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_NVTX_PROFILE
#include "nvtx_profile.h"
#include "core/common/common.h"
#include <nvToolsExt.h>
#include <nvToolsExtCuda.h>
namespace onnxruntime {
namespace profile {
void NvtxRangeCreator::BeginImpl() {
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_NVTX_PROFILE
#include "nvtx_profile.h"
#include "core/common/common.h"
#include <nvToolsExt.h>
#include <nvToolsExtCuda.h>
namespace onnxruntime {
namespace profile {
void NvtxRangeCreator::BeginImpl() {
... |
#ifdef ENABLE_NVTX_PROFILE
#pragma once
#include <cinttypes>
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include "core/common/common.h"
namespace onnxruntime {
namespace profile {
enum class Color : uint32_t {
Black = 0x00000000, Red = 0x00ff0000, DarkGreen = 0x00009900... |
#ifdef ENABLE_NVTX_PROFILE
#pragma once
#include <cinttypes>
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include <string>
#include "core/common/common.h"
namespace onnxruntime {
namespace profile {
enum class Color : uint32_t {
Black = 0x00000000, Red = 0x00ff0000, DarkGreen = 0x00009900... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <thread>
#include <string>
#include <unordered_map>
#include "core/platform/ort_mutex.h"
#ifdef ENABLE_NVTX_PROFILE
namespace onnxruntime {
namespace profile {
// Singleton class of managing glob... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <thread>
#include <string>
#include <unordered_map>
#include "core/platform/ort_mutex.h"
#ifdef ENABLE_NVTX_PROFILE
namespace onnxruntime {
namespace profile {
// Singleton class of managing glob... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/object_detection/non_max_suppression.h"
namespace onnxruntime {
namespace cuda {
struct NonMaxSuppre... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/object_detection/non_max_suppression.h"
namespace onnxruntime {
namespace rocm {
struct NonMaxSuppre... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include <functional>
#include "core/providers/cpu/object_detection/non_max_suppression_helper.h"
namespace onnxruntime {
namespace c... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include <functional>
#include "core/providers/cpu/object_detection/non_max_suppression_helper.h"
namespace onnxruntime {
namespace r... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "roialign.h"
#include "roialign_impl.h"
namespace onnxruntime {
namespace cuda {
#define REGISTER_KERNEL_TYPED(T) \
ONNX_OPERATOR_TYPED_KERNEL_EX( ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "roialign.h"
#include "roialign_impl.h"
namespace onnxruntime {
namespace rocm {
#define REGISTER_KERNEL_TYPED(T) \
ONNX_OPERATOR_TYPED_KERNEL_EX( ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/object_detection/roialign.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
struct R... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/object_detection/roialign.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
struct R... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
void RoiAlignImpl(
cudaStream_t stream,
const int64_t nthread... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
void RoiAlignImpl(
hipStream_t stream,
const int64_t nthreads... |
#pragma once
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/accumulation_type.h"
namespace onnxruntime {
namespace cuda {
namespace detail {
size_t compute_reduce_matrix_columns_intermediate_buffer_size(
int element_size, int num_rows, int num_cols);
}
template <typename TI... |
#pragma once
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/accumulation_type.h"
namespace onnxruntime {
namespace rocm {
namespace detail {
size_t compute_reduce_matrix_columns_intermediate_buffer_size(
int element_size, int num_rows, int num_cols);
}
template <typename TI... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cuda_check_memory.h"
#include "core/providers/cuda/cuda_common.h"
namespace onnxruntime {
void CheckIfMemoryOnCurrentGpuDevice(const void* ptr) {
cudaPointerAttributes attrs;
CUDA_CALL_TH... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/rocm_check_memory.h"
#include "core/providers/rocm/rocm_common.h"
namespace onnxruntime {
void CheckIfMemoryOnCurrentGpuDevice(const void* ptr) {
hipPointerAttribute_t attrs;
HIP_CALL_THR... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
__forceinline__ __host__ __device__ int least_pow2_bound(int value) {
unsigned int value_ = static_cast<unsigned in... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespace rocm {
__forceinline__ __host__ __device__ int least_pow2_bound(int value) {
unsigned int value_ = static_cast<unsigned in... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_fp16.h>
#include "core/framework/float16.h"
namespace onnxruntime {
namespace cuda {
// specifies the auxiliary type to use for accumulation of the given type
template <typename T>
struct Acc... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_fp16.h>
#include "core/framework/float16.h"
namespace onnxruntime {
namespace rocm {
// specifies the auxiliary type to use for accumulation of the given type
template <typename T>
struct ... |
//
// Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#pragma once
#include <iostream>
#include <limits>
#include <cuda_runtime.h>
#include <cmath>
#include "core/common/common.h"
namespace onnxru... | //
// Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#pragma once
#include <iostream>
#include <limits>
#include <hip/hip_runtime.h>
#include <cmath>
#include "core/common/common.h"
namespace onn... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
Status GemmInt8(int m,
int n,
int k,
int32_t alpha_matmul,
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
Status GemmInt8(int m,
int n,
int k,
int32_t alpha_matmul,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename SrcT>
class Cast final : public CudaKernel {
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename SrcT>
class Cast final : public RocmKernel {
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class Compress final : public CudaKernel {
pu... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class Compress final : public RocmKernel {
pu... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace cuda {
cudaError_t CompressCalcPrefixSumTempStorageBytes(cudaStrea... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace rocm {
hipError_t CompressCalcPrefixSumTempStorageBytes(hipStream_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/concatbase.h"
namespace onnxruntime {
namespace cuda... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/concatbase.h"
namespace onnxruntime {
namespace rocm... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace cuda {
template <typename InputDataArray>
Status ConcatSameConcatD... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace rocm {
template <typename InputDataArray>
Status ConcatSameConcatD... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class Expand final : public CudaKernel {
public:
Expand(const OpKernelInfo&... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class Expand final : public RocmKernel {
public:
Expand(const OpKernelInfo&... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
// Throw if "ptr" is not allocated on the CUDA device obtained by cudaGetDevice.
void CheckIfMemoryOnCurrentGpuDevice(const void* ptr);
} // namespace onnxruntime
### | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
namespace onnxruntime {
// Throw if "ptr" is not allocated on the ROCM device obtained by hipGetDevice.
void CheckIfMemoryOnCurrentGpuDevice(const void* ptr);
} // namespace onnxruntime### |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cuda_common.h"
namespace onnxruntime {
namespace cuda {
Status ExpandImpl(
cudaStream_t stream,
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/providers/rocm/rocm_common.h"
namespace onnxruntime {
namespace rocm {
Status ExpandImpl(
hipStream_t stream,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class EyeLike final : public CudaKernel {
public:
EyeLike(const OpKernelInf... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class EyeLike final : public RocmKernel {
public:
EyeLike(const OpKernelInf... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "eye_like_impl.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
__glob... | #include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/providers/rocm/cu_inc/common.cuh"
#include "eye_like_impl.h"
namespace onnxruntime {
namespace rocm {
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/providers/cuda/shared_inc/fast_divmod.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace cuda {
tem... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/providers/rocm/shared_inc/fast_divmod.h"
#include "core/common/common.h"
namespace onnxruntime {
namespace rocm {
tem... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "flatten.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Flatten,
kOnnxDomain,
1, 8,
kCudaExecutionProvider,
(*KernelDefBuilder::Create())
.Alias(0, 0)
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "flatten.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Flatten,
kOnnxDomain,
1, 8,
kRocmExecutionProvider,
(*KernelDefBuilder::Create())
.Alias(0, 0)
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class Flatten final : public CudaKernel {
public:
Flatten(const OpKernelInf... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class Flatten final : public RocmKernel {
public:
Flatten(const OpKernelInf... |
#include "core/providers/cuda/tensor/gather_impl.h"
#include "core/providers/cuda/tensor/gather.h"
#include "core/providers/cpu/tensor/utils.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Gather, kOnnxDomain, 1, 10, kCudaExecutionProvider, (*KernelDefBuilder::Create())
.TypeCons... |
#include "core/providers/rocm/tensor/gather_impl.h"
#include "core/providers/rocm/tensor/gather.h"
#include "core/providers/cpu/tensor/utils.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Gather, kOnnxDomain, 1, 10, kRocmExecutionProvider, (*KernelDefBuilder::Create())
.TypeCons... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/gatherbase.h"
namespace onnxruntime {
namespace cuda {
class Gather : public CudaKe... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/gatherbase.h"
namespace onnxruntime {
namespace rocm {
class Gather : public RocmKe... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/shared_library/provider_api.h"
namespace onnxruntime {
namespace cuda {
struct GatherScatterElementsArgs;
// Coalesce those contiguous a... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/shared_library/provider_api.h"
namespace onnxruntime {
namespace rocm {
struct GatherScatterElementsArgs;
// Coalesce those contiguous a... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
struct GatherScatterElementsArgs {
int64_t rank;
int64_t axis;
int64_t input_size;
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
struct GatherScatterElementsArgs {
int64_t rank;
int64_t axis;
int64_t input_size;
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cuda_graph.h"
#include "core/providers/cuda/cuda_common.h"
#include <cuda_runtime_api.h>
#include <driver_types.h>
namespace onnxruntime {
CUDAGraph::CUDAGraph(cudaStream_t stream) : stream... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/rocm_graph.h"
#include "core/providers/rocm/rocm_common.h"
#include <hip/hip_runtime_api.h>
#include <hip/driver_types.h>
namespace onnxruntime {
ROCMGraph::ROCMGraph(hipStream_t stream) : ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
void GatherImpl(
cudaStream_t stream,
const int64_t input_block_size,
const int... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
void GatherImpl(
hipStream_t stream,
const int64_t input_block_size,
const int6... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
Status CheckBatchDimensionsMatch(
size_t num_batch_dimension... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
Status CheckBatchDimensionsMatch(
size_t num_batch_dimension... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename TIndex>
void ComputeSliceOffsetsImpl(
cudaStream_t stream,
const int64_t batch_dims,... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename TIndex>
void ComputeSliceOffsetsImpl(
hipStream_t stream,
const int64_t batch_dims,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "identity_op.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Dropout,
kOnnxDomain,
7, 9,
kCudaExecutionProvider,
(*KernelDefBuilder::Create())
.TypeConst... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "identity_op.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_VERSIONED_KERNEL_EX(
Dropout,
kOnnxDomain,
7, 9,
kRocmExecutionProvider,
(*KernelDefBuilder::Create())
.TypeConst... |
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <bool is_dropout>
class IdentityOp final : public CudaKernel {
public:
IdentityOp(const OpKernelInfo& info) : CudaKernel(info) {
}
Status ComputeInte... |
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <bool is_dropout>
class IdentityOp final : public RocmKernel {
public:
IdentityOp(const OpKernelInfo& info) : RocmKernel(info) {
}
Status ComputeInte... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
int NonZeroCalcBlockCount(int64_t x_size);
cudaError_t NonZeroCalcPrefixSumTempStorageByte... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
int NonZeroCalcBlockCount(int64_t x_size);
hipError_t NonZeroCalcPrefixSumTempStorageBytes... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class NonZero final : public CudaKernel {
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class NonZero final : public RocmKernel {
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename in_type, typename out_type>
void OneHotImpl(
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename in_type, typename out_type>
void OneHotImpl(
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/padbase.h"
using onnxruntime::PadBase;
namespace onnxruntime {
namespace cuda {
te... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/padbase.h"
using onnxruntime::PadBase;
namespace onnxruntime {
namespace rocm {
te... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
void PadNCHWInputWithPaddingAlongHAndWImpl(
cudaStream_t stream,
... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
void PadNCHWInputWithPaddingAlongHAndWImpl(
hipStream_t stream,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/platform/ort_mutex.h"
#include "core/providers/cuda/cuda_pch.h"
namespace onnxruntime {
using CaptureId_t = unsigned long long;
struct CUDAGraph {
CUDAGraph... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/common/common.h"
#include "core/platform/ort_mutex.h"
#include "core/providers/rocm/rocm_pch.h"
namespace onnxruntime {
using CaptureId_t = unsigned long long;
struct ROCMGraph {
ROCMGraph... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "quantize_linear.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <class T, class U>
Status C... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "quantize_linear.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <class T, class U>
Status C... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <class T, class U>
class QuantizeLinear final : public ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <class T, class U>
class QuantizeLinear final : public ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "reshape.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_EX(
Reshape,
kOnnxDomain,
19,
kCudaExecutionProvider,
(*KernelDefBuilder::Create())
.TypeConstraint("T", Data... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "reshape.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_EX(
Reshape,
kOnnxDomain,
19,
kRocmExecutionProvider,
(*KernelDefBuilder::Create())
.TypeConstraint("T", Data... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cpu/tensor/reshape_helper.h"
namespace onnxruntime {
namespace cuda {
class Resh... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/cpu/tensor/reshape_helper.h"
namespace onnxruntime {
namespace rocm {
class Resh... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "resize.h"
namespace onnxruntime {
namespace cuda {
#define REGISTER_KERNEL_TYPED(T) \
ONNX_OPERATOR_VERSIONED_TYPED_KERNEL_EX( \
Resize, ... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "resize.h"
namespace onnxruntime {
namespace rocm {
#define REGISTER_KERNEL_TYPED(T) \
ONNX_OPERATOR_VERSIONED_TYPED_KERNEL_EX( \
Resize, ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/tensor/upsample.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class Resize : public Upsample<T> {
p... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/tensor/upsample.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class Resize : public Upsample<T> {
p... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include "core/common/common.h"
#include "core/providers/cpu/tensor/upsamplebase.h"
#include "core/providers/cuda/cuda_common.h"
name... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include "core/common/common.h"
#include "core/providers/cpu/tensor/upsamplebase.h"
#include "core/providers/rocm/rocm_common.h"
name... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "reverse_sequence.h"
#include "reverse_sequence_impl.h"
#include "core/providers/cpu/tensor/utils.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_EX(
ReverseSequence,
kOnnxDomain,
1... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "reverse_sequence.h"
#include "reverse_sequence_impl.h"
#include "core/providers/cpu/tensor/utils.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_EX(
ReverseSequence,
kOnnxDomain,
1... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class ReverseSequenceOp final : public CudaKernel {
public:
R... | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/shared_library/provider_api.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class ReverseSequenceOp final : public RocmKernel {
public:
R... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.