hip stringlengths 140 3.32k | cuda stringlengths 84 3.33k |
|---|---|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/math/binary_elementwise_ops.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/fast_divmod.h"
#include "core/providers/cpu/tensor/utils.h"
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/math/binary_elementwise_ops.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/fast_divmod.h"
#include "core/providers/cpu/tensor/utils.h"
... |
#include <stdint.h>
#include "core/providers/rocm/shared_inc/rocm_utils.h"
using namespace onnxruntime::rocm;
namespace onnxruntime {
namespace contrib {
namespace rocm {
// These macros simplifies coding. To add a new op with following steps:
// 1. Add a new entry in CONTRIB_BINARY_OPS() list
// 2. (optional) Defin... |
#include <stdint.h>
#include "core/providers/cuda/shared_inc/cuda_utils.h"
using namespace onnxruntime::cuda;
namespace onnxruntime {
namespace contrib {
namespace cuda {
// These macros simplifies coding. To add a new op with following steps:
// 1. Add a new entry in CONTRIB_BINARY_OPS() list
// 2. (optional) Defin... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/nn/dropout.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace contrib {
namespace rocm {
ONNX_OPERATOR_KERNEL_EX(BitmaskDropout, kMSDomain, 1, kRocmE... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/nn/dropout.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace contrib {
namespace cuda {
ONNX_OPERATOR_KERNEL_EX(BitmaskDropout, kMSDomain, 1, kCudaE... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/math/matmul.h"
namespace onnxruntime {
namespace contrib {
namespace rocm {
#define REGISTER_KERNEL_TYPED(op_name, T) \
ONNX_OPERATOR_TYPED_KERNEL_EX( ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/math/matmul.h"
namespace onnxruntime {
namespace contrib {
namespace cuda {
#define REGISTER_KERNEL_TYPED(op_name, T) \
ONNX_OPERATOR_TYPED_KERNEL_EX( ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "contrib_ops/rocm/math/isfinite.h"
#include "isfinite_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace rocm {
#define REGISTER_ISALLFINITE_KERNEL_TYP... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "contrib_ops/cuda/math/isfinite.h"
#include "isfinite_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace cuda {
#define REGISTER_ISALLFINITE_KERNEL_TYP... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_fp16.h>
#include "core/providers/rocm/cu_inc/common.cuh"
#include "contrib_ops/rocm/math/isfinite.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
__device__ __forceinline... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_fp16.h>
#include "core/providers/cuda/cu_inc/common.cuh"
#include "contrib_ops/cuda/math/isfinite.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
__device__ __forceinline__ ... |
// 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/math/clip.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class Clip_6 final : public onnxruntime::clip_internal::C... |
// 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/math/clip.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class Clip_6 final : public onnxruntime::clip_internal::C... |
// 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 {
template <typename TSrc>
class IsAllFiniteOp final : public RocmKernel {
public:
IsAll... |
// 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 {
template <typename TSrc>
class IsAllFiniteOp final : public CudaKernel {
public:
IsAll... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <hip/hip_fp16.h>
#include "isfinite_impl.h"
#include "core/providers/rocm/cu_inc/common.cuh"
#include "contrib_ops/rocm/math/isfinite.cuh"
namespace onnxruntime {
namespace rocm {
te... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <cuda_fp16.h>
#include "isfinite_impl.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "contrib_ops/cuda/math/isfinite.cuh"
namespace onnxruntime {
namespace cuda {
template <typename TSrc, bool isin... |
// 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 T>
struct IsAllFiniteFunctor {
void operator()(hipStream_t s... |
// 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 T>
struct IsAllFiniteFunctor {
void operator()(cudaStream_t str... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_OPS
// Should remove the shrunken_gather include from ENABLE_TRAINING_OPS once 1). compute optimizer is enabled for inference or
// 2). this is needed by inference for other purpose.
#include "contr... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_OPS
// Should remove the shrunken_gather include from ENABLE_TRAINING_OPS once 1). compute optimizer is enabled for inference or
// 2). this is needed by inference for other purpose.
#include "contr... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_OPS
// Should remove the shrunken_gather include from ENABLE_TRAINING_OPS once 1). compute optimizer is enabled for inference or
// 2). this is needed by inference for other purpose.
#include "core/... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef ENABLE_TRAINING_OPS
// Should remove the shrunken_gather include from ENABLE_TRAINING_OPS once 1). compute optimizer is enabled for inference or
// 2). this is needed by inference for other purpose.
#include "core/... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/tensor/trilu.h"
namespace onnxruntime {
namespace contrib {
namespace rocm {
ONNX_OPERATOR_KERNEL_EX(
Trilu,
kMSDomain,
1,
kRocmExecutionProvider,
(*KernelDefBuilder::Cre... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/tensor/trilu.h"
namespace onnxruntime {
namespace contrib {
namespace cuda {
ONNX_OPERATOR_KERNEL_EX(
Trilu,
kMSDomain,
1,
kCudaExecutionProvider,
(*KernelDefBuilder::Cre... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "contrib_ops/cpu/transformers/beam_search.h"
namespace onnxruntime {
class SessionState;
namespace contrib {
namespace rocm {
class BeamSearch final : public onnxruntime::contrib::transformers::Be... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "contrib_ops/cpu/transformers/beam_search.h"
namespace onnxruntime {
class SessionState;
namespace contrib {
namespace cuda {
class BeamSearch final : public onnxruntime::contrib::transformers::Be... |
// 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 contrib {
namespace rocm {
template <typename T>
void BeamSearchTopK(
const T* input,
int32_t batch_size,
int3... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include <cuda_runtime.h>
namespace onnxruntime {
namespace contrib {
namespace cuda {
template <typename T>
void BeamSearchTopK(
const T* input,
int32_t batch_size,
int32_t... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/tensorprotoutils.h"
#include "core/framework/ort_value.h"
#include "contrib_ops/cpu/utils/console_dumper.h"
namespace onnxruntime {
namespace contrib {
namespace rocm {
namespace tra... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/tensorprotoutils.h"
#include "core/framework/ort_value.h"
#include "contrib_ops/cpu/utils/console_dumper.h"
namespace onnxruntime {
namespace contrib {
namespace cuda {
namespace tra... |
#pragma once
#include <stdint.h>
#include <hip/hip_fp16.h>
#include <hiprand/hiprand_kernel.h>
namespace onnxruntime {
namespace contrib {
namespace rocm {
void LaunchInitKernel(
float* beam_scores, int batch_size, int num_beams, hipStream_t stream);
template <typename T>
void LaunchAddProbsKernel(T* log_probs, T*... |
#pragma once
#include <stdint.h>
#include <cuda_fp16.h>
#include <curand_kernel.h>
namespace onnxruntime {
namespace contrib {
namespace cuda {
void LaunchInitKernel(
float* beam_scores, int batch_size, int num_beams, cudaStream_t stream);
template <typename T>
void LaunchAddProbsKernel(T* log_probs, T* cum_log_pr... |
#include "hip/hip_runtime.h"
#include "core/providers/rocm/math/clip_impl.h"
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespace rocm {
template <typename T>
__global__ void _Clip(const T* input, T* output, const T* min, const T* max, T min_default, T max_default, size_t N) {
auto min... |
#include "core/providers/cuda/math/clip_impl.h"
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typename T>
__global__ void _Clip(const T* input, T* output, const T* min, const T* max, T min_default, T max_default, size_t N) {
auto min_val = (min) ? *min : min_def... |
// 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 contrib {
namespace rocm {
template <typename T>
void GreedySearchTopOne(
const T* input,
int32_t batch_size,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
#include <cuda_runtime.h>
namespace onnxruntime {
namespace contrib {
namespace cuda {
template <typename T>
void GreedySearchTopOne(
const T* input,
int32_t batch_size,
int... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/rocm_execution_provider.h"
#include "contrib_ops/rocm/transformers/sampling.h"
#include "contrib_ops/rocm/transformers/generation_device_helper.h"
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/cuda_execution_provider.h"
#include "contrib_ops/cuda/transformers/sampling.h"
#include "contrib_ops/cuda/transformers/generation_device_helper.h"
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "contrib_ops/cpu/transformers/sampling.h"
namespace onnxruntime {
class SessionState;
namespace contrib {
namespace rocm {
class Sampling final : public onnxruntime::contrib::transformers::Samplin... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "contrib_ops/cpu/transformers/sampling.h"
namespace onnxruntime {
class SessionState;
namespace contrib {
namespace cuda {
class Sampling final : public onnxruntime::contrib::transformers::Samplin... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/activation/activations_grad.h"
#include "core/framework/op_kernel.h"
namespace onnxruntime {
namespace rocm {
#define REGISTER_ACTIVATION_GRAD_KERNEL(x, ver, domain, T) \
O... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/activation/activations_grad.h"
#include "core/framework/op_kernel.h"
namespace onnxruntime {
namespace cuda {
#define REGISTER_ACTIVATION_GRAD_KERNEL(x, ver, domain, T) \
O... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/math/binary_elementwise_ops.h"
#include "core/providers/rocm/activation/activations.h"
#include "orttraining/training_ops/rocm/activa... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/math/binary_elementwise_ops.h"
#include "core/providers/cuda/activation/activations.h"
#include "orttraining/training_ops/cuda/activa... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/activation/activations_impl.h"
namespace onnxruntime {
namespace rocm {
typedef onnxruntime::rocm::CtxNull CtxGeluGrad;
typedef onnxruntime::rocm::CtxNull CtxFastGeluGrad;
typed... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/activation/activations_impl.h"
namespace onnxruntime {
namespace cuda {
typedef onnxruntime::cuda::CtxNull CtxGeluGrad;
typedef onnxruntime::cuda::CtxNull CtxFastGeluGrad;
typed... |
#include "orttraining/training_ops/rocm/activation/bias_gelu_grad.h"
#include "core/common/common.h"
#include "orttraining/training_ops/cpu/activation/gelu_computation_mode.h"
#include "orttraining/training_ops/rocm/activation/bias_gelu_grad_impl.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_EX(
... |
#include "orttraining/training_ops/cuda/activation/bias_gelu_grad.h"
#include "core/common/common.h"
#include "orttraining/training_ops/cpu/activation/gelu_computation_mode.h"
#include "orttraining/training_ops/cuda/activation/bias_gelu_grad_impl.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_EX(
... |
// 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 GeluComputationMode>
class BiasGeluGrad_dX : public RocmKernel {
public:
BiasGeluGrad_dX(const OpK... |
// 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 GeluComputationMode>
class BiasGeluGrad_dX : public CudaKernel {
public:
BiasGeluGrad_dX(const OpK... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
namespace onnxruntime {
namespace rocm {
// assumptions:
// - dY, X, dX have input_size elements
// - B has bias_size elements
// - input_size % bias_size == 0
template <typename T, typen... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
namespace onnxruntime {
namespace cuda {
// assumptions:
// - dY, X, dX have input_size elements
// - B has bias_size elements
// - input_size % bias_size == 0
template <typename T, typen... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "orttraining/core/graph/horovod_adapters.h"
#include "orttraining/core/graph/optimizer_config.h"
namespace onnxruntime {
namespace rocm {
class HorovodA... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "orttraining/core/graph/horovod_adapters.h"
#include "orttraining/core/graph/optimizer_config.h"
namespace onnxruntime {
namespace cuda {
class HorovodA... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/math/clip.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
vo... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/math/clip.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
vo... |
#pragma once
#include "core/providers/rocm/cu_inc/common.cuh"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <int NumUnroll>
__device__ __forceinline__ void SetBitmask(const HIP_LONG id, const HIP_LONG mask_element_count, const fast_divmod fdm_bits_per_eleme... |
#pragma once
#include "core/providers/cuda/cu_inc/common.cuh"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <int NumUnroll>
__device__ __forceinline__ void SetBitmask(const CUDA_LONG id, const CUDA_LONG mask_element_count, const fast_divmod fdm_bits_per_ele... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_kernel.h"
#include "orttraining/core/framework/distributed_run_context.h"
#if defined(ORT_USE_NCCL)
#include <rccl/rccl.h>
#endif
namespace onnxruntime {
namespace rocm {
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_kernel.h"
#include "orttraining/core/framework/distributed_run_context.h"
#if defined(ORT_USE_NCCL)
#include <nccl.h>
#endif
namespace onnxruntime {
namespace cuda {
#if ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "nccl_common.h"
namespace onnxruntime {
namespace rocm {
class NcclAllReduce final : public NcclKernel {
public:
explicit NcclAllReduce(const OpKernelInfo& info);
Status ComputeInternal(OpKer... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "nccl_common.h"
namespace onnxruntime {
namespace cuda {
class NcclAllReduce final : public NcclKernel {
public:
explicit NcclAllReduce(const OpKernelInfo& info);
Status ComputeInternal(OpKer... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#if defined(ORT_USE_NCCL) || defined(USE_MPI)
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class Recv final : public RocmKernel {
pu... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#if defined(ORT_USE_NCCL) || defined(USE_MPI)
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class Recv final : public CudaKernel {
pu... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#if defined(ORT_USE_NCCL) || defined(USE_MPI)
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class Send final : public RocmKernel {
pu... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#if defined(ORT_USE_NCCL) || defined(USE_MPI)
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class Send 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 "orttraining/training_ops/cpu/controlflow/group.h"
#include "core/providers/rocm/rocm_fwd.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/training_ops/cpu/controlflow/group.h"
#include "core/providers/cuda/cuda_fwd.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/controlflow/record.h"
#include "core/providers/cpu/tensor/utils.h"
// Include event mechanism shared by CPU and GPU implementations.
#include "orttraining/training_ops/cpu/controlflo... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/controlflow/record.h"
#include "core/providers/cpu/tensor/utils.h"
// Include event mechanism shared by CPU and GPU implementations.
#include "orttraining/training_ops/cpu/controlflo... |
// 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/rocm/miopen_common.h"
namespace onnxruntime {
namespace rocm {
class RecordEvent final : public RocmKerne... |
// 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/cuda/cudnn_common.h"
namespace onnxruntime {
namespace cuda {
class RecordEvent final : public CudaKernel... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/controlflow/wait.h"
#include "core/providers/cpu/tensor/utils.h"
// Include event mechanism shared by CPU and GPU implementations.
#include "orttraining/training_ops/cpu/controlflow/... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/controlflow/wait.h"
#include "core/providers/cpu/tensor/utils.h"
// Include event mechanism shared by CPU and GPU implementations.
#include "orttraining/training_ops/cpu/controlflow/... |
// 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/rocm/miopen_common.h"
namespace onnxruntime {
namespace rocm {
class WaitEvent final : public RocmKernel ... |
// 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/cuda/cudnn_common.h"
namespace onnxruntime {
namespace cuda {
class WaitEvent final : public CudaKernel {... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/training_ops/cpu/controlflow/yield.h"
#include "core/providers/rocm/rocm_fwd.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KERNEL_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/training_ops/cpu/controlflow/yield.h"
#include "core/providers/cuda/cuda_fwd.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KERNEL_... |
// 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 CumSum final : public RocmKernel {
public:
explicit CumSum(const OpKernelInfo& i... |
// 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 CumSum final : public CudaKernel {
public:
explicit CumSum(const OpKernelInfo& i... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class GistBinarizeEncoderOp final : public RocmKernel... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class GistBinarizeEncoderOp final : public CudaKernel... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/shared_inc/rocm_utils.h"
#include <stdio.h>
#include <assert.h>
#include <hip/hip_runtime.h>
namespace onnxruntime {
namespace rocm {
static constexpr int GIST_PACK1_FACTOR = 8;
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/shared_inc/cuda_utils.h"
#include <stdio.h>
#include <assert.h>
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
static constexpr int GIST_PACK1_FACTOR = 8;
tem... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "orttraining/training_ops/cpu/loss/reduction_type.h"
#include "core/providers/rocm/reduction/reduction_ops.h"
#include "orttraining/training_ops/rocm/loss/softmaxcrossentropy_impl.h"
namespace onnxr... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "orttraining/training_ops/cpu/loss/reduction_type.h"
#include "core/providers/cuda/reduction/reduction_ops.h"
#include "orttraining/training_ops/cuda/loss/softmaxcrossentropy_impl.h"
namespace onnxr... |
#pragma once
#include "orttraining/training_ops/cpu/loss/reduction_type.h"
#include "core/providers/rocm/reduction/reduction_ops.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
void SoftMaxCrossEntropyImpl(
hipStream_t stream, const T* log_prob, const T* label, size_t normalize_factor, T* output_... |
#pragma once
#include "orttraining/training_ops/cpu/loss/reduction_type.h"
#include "core/providers/cuda/reduction/reduction_ops.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
void SoftMaxCrossEntropyImpl(
cudaStream_t stream, const T* log_prob, const T* label, size_t normalize_factor, T* output... |
// 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 {
class BiasSoftmaxDropout final : public onnxruntime::rocm::RocmKernel {
public:
BiasSoftmaxDropout(const OpKernelInfo... |
// 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 {
class BiasSoftmaxDropout final : public onnxruntime::cuda::CudaKernel {
public:
BiasSoftmaxDropout(const OpKernelInfo... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/random_generator.h"
#include "core/providers/rocm/rocm_common.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
Status BiasSoftmaxDropoutImpl(hipStream_t stream, con... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/framework/random_generator.h"
#include "core/providers/cuda/cuda_common.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
Status BiasSoftmaxDropoutImpl(cudaStream_t stream, co... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/reduction/reduction_ops.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class DivGrad : public ReduceKernel<true> ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/reduction/reduction_ops.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class DivGrad : public ReduceKernel<true> ... |
// 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 ImplDivGradSimple(
hipStream_t stream,
SimpleBroadcast si... |
// 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 ImplDivGradSimple(
cudaStream_t stream,
SimpleBroadcast s... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/math/isfinite.h"
#include "orttraining/training_ops/rocm/math/isfinite_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/math/isfinite.h"
#include "orttraining/training_ops/cuda/math/isfinite_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace... |
// 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 {
template <typename TSrc>
class IsFiniteOp final : public RocmKernel {
public:
IsFinit... |
// 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 {
template <typename TSrc>
class IsFiniteOp final : public CudaKernel {
public:
IsFinit... |
// 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 CumSumImpl(
hipStream_t stream,
const T* input_data,
... |
// 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 CumSumImpl(
cudaStream_t stream,
const T* input_data,
... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "isfinite_impl.h"
#include <hip/hip_fp16.h>
#include "core/providers/rocm/cu_inc/common.cuh"
#include "contrib_ops/rocm/math/isfinite.cuh"
namespace onnxruntime {
namespace rocm {
t... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "isfinite_impl.h"
#include <cuda_fp16.h>
#include "core/providers/cuda/cu_inc/common.cuh"
#include "contrib_ops/cuda/math/isfinite.cuh"
namespace onnxruntime {
namespace cuda {
template <typename TSrc>
__global... |
// 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 TSrc>
void IsFinite(hipStream_t stream, const TSrc* input, bool* output, size_t N);
}
} // namespace onnxruntime
##... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename TSrc>
void IsFinite(cudaStream_t stream, const TSrc* input, bool* output, size_t N);
}
} // namespace onnxruntime
##... |
// 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 {
template <typename SrcT>
class MixedPrecisionScale final : public RocmKernel {
public:
... |
// 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 {
template <typename SrcT>
class MixedPrecisionScale final : public CudaKernel {
public:
... |
#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 "mixed_precision_scale_impl.h"
#include <hip/hip_fp16.h>
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef _WIN32
#pragma warning(disable : 4244)
#endif
#include "mixed_precision_scale_impl.h"
#include <cuda_fp16.h>
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typ... |
// 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 SrcT, typename DstT>
void Impl_MixedPrecisionScale(
hipStream_t stream,
const SrcT* input_data,
const floa... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename SrcT, typename DstT>
void Impl_MixedPrecisionScale(
cudaStream_t stream,
const SrcT* input_data,
const float*... |
#include "orttraining/training_ops/rocm/math/scale.h"
#include "orttraining/training_ops/rocm/math/scale_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace rocm {
#define REGISTER_SCALE_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( ... |
#include "orttraining/training_ops/cuda/math/scale.h"
#include "orttraining/training_ops/cuda/math/scale_impl.h"
using namespace ONNX_NAMESPACE;
using namespace onnxruntime::common;
namespace onnxruntime {
namespace cuda {
#define REGISTER_SCALE_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( ... |
// 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 Scale final : public RocmKernel {
public:
Scale(const OpKernelInfo& info);
Status Comput... |
// 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 Scale final : public CudaKernel {
public:
Scale(const OpKernelInfo& info);
Status Comput... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/math/scale_impl.h"
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespace rocm {
template <typename T, int NumThreadsPerBlo... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/math/scale_impl.h"
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typename T, int NumThreadsPerBlock, int NumElementsPerThread>... |
// 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 Impl_Scale(
hipStream_t stream,
const T* input_data,
const float scale_value,
T* output_data,... |
// 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 Impl_Scale(
cudaStream_t stream,
const T* input_data,
const float scale_value,
T* output_data,
... |
// 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 {
class SoftmaxDropoutGrad final : public RocmKernel {
public:
SoftmaxDropoutGrad(const OpKernelInfo& info) : RocmKerne... |
// 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 {
class SoftmaxDropoutGrad final : public CudaKernel {
public:
SoftmaxDropoutGrad(const OpKernelInfo& info) : CudaKerne... |
// 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 Gemm final : public RocmKernel {
using Base = RocmKernel;
public:
Gemm(const OpKernelIn... |
// 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 Gemm final : public CudaKernel {
using Base = CudaKernel;
public:
Gemm(const OpKernelIn... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
Status SoftmaxDropoutGradImpl(hipStream_t stream, miopenHandle_t miopen_handle, T* input_grad_data... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
Status SoftmaxDropoutGradImpl(cudaStream_t stream, cudnnHandle_t cudnn_handle, T* input_grad_data,... |
// 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 {
class SoftmaxGrad final : public RocmKernel {
public:
SoftmaxGrad(const OpKernelInfo& info) : RocmKernel{info} {
... |
// 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 {
class SoftmaxGrad final : public CudaKernel {
public:
SoftmaxGrad(const OpKernelInfo& info) : CudaKernel{info} {
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
Status SoftmaxGradImpl(hipStream_t stream, m... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
Status SoftmaxGradImpl(cudaStream_t stream, ... |
// 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 UseBitmask>
class DropoutGrad final : public RocmKernel {
public:
DropoutGrad(const OpKernelInfo& info... |
// 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 UseBitmask>
class DropoutGrad final : public CudaKernel {
public:
DropoutGrad(const OpKernelInfo& info... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
namespace onnxruntime {
namespace rocm {
template <typename T>
void DropoutGradientKernelImpl(hipStream_t stream, const int64_t N, const T* dY_data, const void* mask_data,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
namespace onnxruntime {
namespace cuda {
template <typename T>
void DropoutGradientKernelImpl(cudaStream_t stream, const int64_t N, const T* dY_data, const void* mask_data,
... |
#pragma once
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T, typename U, typename V, bool simplified>
class LayerNormGrad final : public RocmKernel {
public:
LayerNormGrad(const OpKernelInfo& op_kernel_info);
Status Compu... |
#pragma once
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename T, typename U, typename V, bool simplified>
class LayerNormGrad final : public CudaKernel {
public:
LayerNormGrad(const OpKernelInfo& op_kernel_info);
Status Compu... |
/**
* 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/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD, typename T_... |
// 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 {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD, typename T_... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
#include <hip/hip_runtime.h>
namespace onnxruntime {
namespace rocm {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD, typename T_GRAD_NORM, typename T_MIXED... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cstdint>
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD, typename T_GRAD_NORM, typename T_MIXED_PR... |
#include <memory>
#include <utility>
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/training_ops/rocm/optimizer/adamw/adamw.h"
#include "orttraining/training_ops/rocm/optimizer/adamw/adamw_impl.h"
#include "orttraining/training_ops/rocm/optimizer/common.h"
namespace onnxruntime {
names... |
#include <memory>
#include <utility>
#include "core/providers/shared_library/provider_api.h"
#include "orttraining/training_ops/cuda/optimizer/adamw/adamw.h"
#include "orttraining/training_ops/cuda/optimizer/adamw/adamw_impl.h"
#include "orttraining/training_ops/cuda/optimizer/common.h"
namespace onnxruntime {
names... |
// 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 MatMul final : public RocmKernel {
using Base = RocmKernel;
public:
MatMul(const OpKern... |
// 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 MatMul final : public CudaKernel {
using Base = CudaKernel;
public:
MatMul(const OpKern... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <vector>
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
#include "orttraining/training_ops/cpu/optimizer/adamw/adamwbase.h"
namespace onnxruntime {
namespace rocm {
cl... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <vector>
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
#include "orttraining/training_ops/cpu/optimizer/adamw/adamwbase.h"
namespace onnxruntime {
namespace cuda {
cl... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/multi_tensor/common.cuh"
namespace onnxruntime {
namespace rocm {
#define MTA_ADAMW_GROUP_SIZE 4
#define MTA_ADAMW_CHUNK_SIZE 2048 * 32
template <typename T_WEIGHT, typename T... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/multi_tensor/common.cuh"
namespace onnxruntime {
namespace cuda {
#define MTA_ADAMW_GROUP_SIZE 4
#define MTA_ADAMW_CHUNK_SIZE 2048 * 32
template <typename T_WEIGHT, typename T... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <string>
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
class InplaceClipGradNorm final : public RocmKernel {
public:
Inpla... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <string>
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
class InplaceClipGradNorm final : public CudaKernel {
public:
Inpla... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <algorithm>
#include "core/providers/rocm/rocm_common.h"
#include "orttraining/training_ops/rocm/optimizer/clip_grad_norm/clip_grad_norm_impl.h"
namespace onnxruntime {
namespace rocm... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <algorithm>
#include "core/providers/cuda/cuda_common.h"
#include "orttraining/training_ops/cuda/optimizer/clip_grad_norm/clip_grad_norm_impl.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
__g... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/multi_tensor/common.cuh"
namespace onnxruntime {
namespace rocm {
constexpr int ClipGradNormGroupSize = 1;
template <typename T>
struct ClipGradNormFunctor {
void operator()... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/multi_tensor/common.cuh"
namespace onnxruntime {
namespace cuda {
constexpr int ClipGradNormGroupSize = 1;
template <typename T>
struct ClipGradNormFunctor {
void operator()... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/optimizer/common.h"
namespace onnxruntime {
namespace rocm {
Status CopyIfNotSameROCMBuffer(OpKernelContext* ctx, size_t number_of_values,
const Tens... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/optimizer/common.h"
namespace onnxruntime {
namespace cuda {
Status CopyIfNotSameCUDABuffer(OpKernelContext* ctx, size_t number_of_values,
const Tens... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_runtime.h>
#include <hip/hip_fp16.h>
namespace onnxruntime {
namespace rocm {
// ---------------------------------------------------------------------------
// _ComputeGradScale -- helper t... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
#include <cuda_fp16.h>
namespace onnxruntime {
namespace cuda {
// ---------------------------------------------------------------------------
// _ComputeGradScale -- helper to calc... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/rocm_common.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
Status CopyIfNotSameBuffer(hipStream_t stream, const Tensor& source_tensor, Tensor& target_tensor) ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/cuda_common.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
Status CopyIfNotSameBuffer(cudaStream_t stream, const Tensor& source_tensor, Tensor& target_tensor)... |
// 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 {
template <typename T>
class ZeroGradient final : public RocmKernel {
public:
ZeroGradi... |
// 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 {
template <typename T>
class ZeroGradient final : public CudaKernel {
public:
ZeroGradi... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <hip/hip_runtime.h>
namespace onnxruntime {
namespace rocm {
// Implementation can be found in rocm file
template <typename T, typename T_GRAD>
void InPlaceAccumulatorImpl(
hipStream_t stream,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
// Implementation can be found in cuda file
template <typename T, typename T_GRAD>
void InPlaceAccumulatorImpl(
cudaStream_t stream,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "matmul_integer.h"
#include "core/providers/cpu/math/matmul_helper.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/shared_inc/rocm_utils.h"
namespace onnxruntime {
name... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "matmul_integer.h"
#include "core/providers/cpu/math/matmul_helper.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/shared_inc/cuda_utils.h"
namespace onnxruntime {
name... |
// 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 {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD_NORM, typen... |
// 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 {
template <typename T1, typename T2, typename T3, typename T4, typename T_GRAD_NORM, typen... |
#pragma once
#include <hip/hip_runtime.h>
#include "core/providers/rocm/rocm_kernel.h"
#include "core/providers/rocm/multi_tensor/common.cuh"
#include "core/framework/stream_handles.h"
namespace onnxruntime {
namespace rocm {
template <typename T1, typename T2, typename T3, typename T_GRAD_NORM>
void LambCompute... |
#pragma once
#include <cuda_runtime.h>
#include "core/providers/cuda/cuda_kernel.h"
#include "core/providers/cuda/multi_tensor/common.cuh"
#include "core/framework/stream_handles.h"
namespace onnxruntime {
namespace cuda {
template <typename T1, typename T2, typename T3, typename T_GRAD_NORM>
void LambComputeDir... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "sg.h"
#include "sg_impl.h"
#include "core/providers/rocm/reduction/reduction_functions.h"
#include "core/providers/rocm/math/binary_elementwise_ops.h"
namespace onnxruntime {
namespace rocm {
ONNX_OPERATOR_KER... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "sg.h"
#include "sg_impl.h"
#include "core/providers/cuda/reduction/reduction_functions.h"
#include "core/providers/cuda/math/binary_elementwise_ops.h"
namespace onnxruntime {
namespace cuda {
ONNX_OPERATOR_KER... |
// 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 SGDOptimizer final : public RocmKernel {
public:
SGDOptimizer(const OpKernelInfo... |
// 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 SGDOptimizer final : public CudaKernel {
public:
SGDOptimizer(const OpKernelInfo... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "sg_impl.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/cu_inc/common.cuh"
#include "core/providers/rocm/atomic/common.cuh"
namespace onnxruntime {
name... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "sg_impl.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/cu_inc/common.cuh"
#include "core/providers/cuda/atomic/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typen... |
// 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 SGDOptimizerImpl(
hipStream_t stream,
const T* eta,
const T* weights,
const T* gradients,
... |
// 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 SGDOptimizerImpl(
cudaStream_t stream,
const T* eta,
const T* weights,
const T* gradients,
T*... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/optimizer/common.h"
#include "orttraining/training_ops/rocm/optimizer/sgd/sgd.h"
#include "orttraining/training_ops/rocm/optimizer/sgd/sgd_impl.h"
namespace onnxruntime {
namespace ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/optimizer/common.h"
#include "orttraining/training_ops/cuda/optimizer/sgd/sgd.h"
#include "orttraining/training_ops/cuda/optimizer/sgd/sgd_impl.h"
namespace onnxruntime {
namespace ... |
// 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 "orttraining/training_ops/cpu/optimizer/sgd/sgdbase.h"
namespace onnxruntime {
namespace rocm {
class SGDOptimizerV2 fina... |
// 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 "orttraining/training_ops/cpu/optimizer/sgd/sgdbase.h"
namespace onnxruntime {
namespace cuda {
class SGDOptimizerV2 fina... |
#include "hip/hip_runtime.h"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/optimizer/sgd/sgd_impl.h"
#include "core/providers/rocm/rocm_common.h"
#include "core/providers/rocm/cu_inc/common.cuh"
namespace onnxruntime {
namespac... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/optimizer/sgd/sgd_impl.h"
#include "core/providers/cuda/cuda_common.h"
#include "core/providers/cuda/cu_inc/common.cuh"
namespace onnxruntime {
namespace cuda {
template <typename ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/rocm/multi_tensor/common.cuh"
namespace onnxruntime {
namespace rocm {
#define MTA_SGD_GROUP_SIZE 2
#define MTA_SGD_CHUNK_SIZE 2048 * 32
template <typename T_WEIGHT, typename T_GRA... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "core/providers/cuda/multi_tensor/common.cuh"
namespace onnxruntime {
namespace cuda {
#define MTA_SGD_GROUP_SIZE 2
#define MTA_SGD_CHUNK_SIZE 2048 * 32
template <typename T_WEIGHT, typename T_GRA... |
// 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 T1, typename T2>
class MatMulInteger final : public RocmKernel {
using Base = RocmKernel;
public:
... |
// 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 T1, typename T2>
class MatMulInteger final : public CudaKernel {
using Base = CudaKernel;
public:
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <string>
#include "core/common/common.h"
#include "core/providers/rocm/rocm_kernel.h"
namespace onnxruntime {
namespace rocm {
template <typename T>
class FakeQuant final : public RocmKernel {
pub... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <string>
#include "core/common/common.h"
#include "core/providers/cuda/cuda_kernel.h"
namespace onnxruntime {
namespace cuda {
template <typename T>
class FakeQuant final : public CudaKernel {
pub... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
namespace onnxruntime {
namespace rocm {
template <typename T>
void FakeQuantPerTensor(hipStream_t stream, const int64_t num_elements, const T* input_data, const T quant_scale,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <stdint.h>
namespace onnxruntime {
namespace cuda {
template <typename T>
void FakeQuantPerTensor(cudaStream_t stream, const int64_t num_elements, const T* input_data, const T quant_scale,
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/rocm/reduction/all.h"
#include "orttraining/training_ops/rocm/reduction/all_impl.h"
namespace onnxruntime {
namespace rocm {
#define REGISTER_ALL_KERNEL_TYPED(T) ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "orttraining/training_ops/cuda/reduction/all.h"
#include "orttraining/training_ops/cuda/reduction/all_impl.h"
namespace onnxruntime {
namespace cuda {
#define REGISTER_ALL_KERNEL_TYPED(T) ... |
// 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 All final : public RocmKernel {
public:
All(const OpKernelInfo& info) : RocmKernel(info) {... |
// 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 All final : public CudaKernel {
public:
All(const OpKernelInfo& info) : CudaKernel(info) {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.