cuda
stringlengths
84
3.33k
hip
stringlengths
140
3.32k
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/JitLoops.cuh> #include <ATen/native...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #in...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/JitLoops.cuh> #include <ATen/native...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #in...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/JitLoops.cuh> #include <ATen/native...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/UnaryOps.h> #include <limits> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/Math.h> #include <ATen/native/TensorIterator.h> #in...
#pragma once #include <ATen/native/Pow.h> #include <c10/core/Scalar.h> namespace at { namespace native { namespace { // SFINAE doesn't work well with NVCC under Windows for math functions like pow and sqrt. // So we need to define the functions with the explicit function signatures. // As for pow, the following si...
// !!! This is a file automatically generated by hipify!!! #pragma once #include <ATen/native/Pow.h> #include <c10/core/Scalar.h> namespace at { namespace native { namespace { // SFINAE doesn't work well with NVCC under Windows for math functions like pow and sqrt. // So we need to define the functions with the ex...
#include <ATen/cuda/CUDAGeneratorImpl.h> #include <ATen/cuda/CUDAGraphsUtils.cuh> #include <ATen/Utils.h> #include <curand.h> #include <curand_kernel.h> #include <curand_philox4x32_x.h> namespace { // See note [Algorithm of randperm] template<typename T, typename scalar_t> __global__ void randperm_handle_duplicate_...
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/hip\HIPGeneratorImpl.h> #include <ATen/hip\HIPGraphsUtils.cuh> #include <ATen/Utils.h> #include <hiprand/hiprand.h> #include <hiprand/hiprand_kernel.h> #include <hiprand/hiprand_kernel.h> namespace { // See note [...
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <c10/cuda/CUDACachingAllocator.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/record_stream_native.h> #endif namespace at::native { void record_stream_cuda(Tensor& self, c10::Stream stream...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_ONLY_METHOD_OPERATORS #include <ATen/core/Tensor.h> #include <c10/hip/HIPCachingAllocator.h> #ifndef AT_PER_OPERATOR_HEADERS #include <ATen/NativeFunctions.h> #else #include <ATen/ops/record_stream_native.h> #endif namespace at::native {...
#include <ATen/cuda/Sleep.h> #include <c10/cuda/CUDAException.h> #include <c10/cuda/CUDAStream.h> namespace at { namespace cuda { namespace { __global__ void spin_kernel(int64_t cycles) { // Few AMD specific GPUs have different clock intrinsic #if defined(__GFX11__) && defined(USE_ROCM) && !defined(__CUDA_ARCH__) ...
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/hip\Sleep.h> #include <c10/hip/HIPException.h> #include <c10/hip/HIPStream.h> namespace at { namespace hip { namespace { __global__ void spin_kernel(int64_t cycles) { // Few AMD specific GPUs have different clock...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/cuda/Reduce.cuh> #include <c10/util/ArrayRef.h> #include <iostream> namespace at::native { static inline std::ostream& operator<<(std::ostream& out, dim3 dim) { if (dim.y == 1 && dim.z == 1) { out << dim.x; } else { out << "[" << dim.x << "," << d...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/hip\Reduce.cuh> #include <c10/util/ArrayRef.h> #include <iostream> namespace at::native { static inline std::ostream& operator<<(std::ostream& out, dim3 dim) { if (dim.y == 1 && dim.z == 1) { ou...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/TensorCompare.h> #include <ATen/native/TensorIterator...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/n...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/TensorCompare.h> #include <ATen/native/TensorIterator...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/n...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/TensorCompare.h> #include <ATen/native/TensorIterator...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/n...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/Dispatch.h> namespace at::native { void and_kernel_cuda(TensorIterator& ite...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/hip\Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/Dispatch.h> namesp...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/TensorCompare.h> #include <ATen/native/TensorIterator...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/n...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/cuda/ReduceOps.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/Dispatch.h> #include <ATen/cuda/NumericLimits.cuh> #include <ATen/native...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/hip\Reduce.cuh> #include <ATen/native/hip\ReduceOps.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/Dispatch.h> #in...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/ReduceOps.h>...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/AccumulateType.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/hip\Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/AccumulateType.h> #include <ATen/Dispatch.h> #include <ATen/native/ReduceOps.h>...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/TensorIterator.h> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/ReduceOps.h> #include <ATen/native/LinearAlgebra.h> #include <c10/core/Scalar.h> nam...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/TensorIterator.h> #include <ATen/native/hip\Reduce.cuh> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/ReduceOps.h> #include <ATen...
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/Normalization.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Loops.cuh> #include <ATen/Dispatch.h> namespace at::native { namespace { void renorm_scale_factor_impl(TensorIteratorBase& iter, double maxnorm) { AT_DISPATCH_FLOATING_TYPES(...
// !!! This is a file automatically generated by hipify!!! #define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/Normalization.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/hip\Loops.cuh> #include <ATen/Dispatch.h> namespace at::native { namespace { void renorm_scale_factor_impl(TensorIteratorB...
#include <ATen/cuda/detail/IndexUtils.cuh> #include <vector> namespace at { namespace cuda { namespace detail { struct SizeAndStride { int64_t size; int64_t stride; }; /* A comparator that will sort SizeAndStride structs by stride, in ascending order. */ int compareSizeAndStride(const void* a, const void* b...
// !!! This is a file automatically generated by hipify!!! #include <ATen/hip/detail\IndexUtils.cuh> #include <vector> namespace at { namespace hip { namespace detail { struct SizeAndStride { int64_t size; int64_t stride; }; /* A comparator that will sort SizeAndStride structs by stride, in ascending order. ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once namespace onnxruntime { namespace cuda { struct CtxAlpha { float alpha; }; struct CtxAlphaBeta { float alpha; float beta; }; struct CtxAlphaGamma { float alpha; float gamma; }; struct CtxNull { }...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once namespace onnxruntime { namespace rocm { struct CtxAlpha { float alpha; }; struct CtxAlphaBeta { float alpha; float beta; }; struct CtxAlphaGamma { float alpha; float gamma; }; struct CtxNull { }...
// 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 ScatterElements final : public CudaKernel { public: Scat...
// 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 ScatterElements final : public RocmKernel { public: Scat...
// 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 ScatterEl...
// 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 ScatterEl...
#include "core/providers/cuda/tensor/scatter_nd.h" #include "core/providers/cuda/tensor/scatter_nd_impl.h" #include "core/providers/cuda/shared_inc/cuda_utils.h" #include "core/providers/cpu/tensor/utils.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_VERSIONED_KERNEL_EX(ScatterND, kOnnxDomain, 11, 12, kCu...
#include "core/providers/rocm/tensor/scatter_nd.h" #include "core/providers/rocm/tensor/scatter_nd_impl.h" #include "core/providers/rocm/shared_inc/rocm_utils.h" #include "core/providers/cpu/tensor/utils.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_VERSIONED_KERNEL_EX(ScatterND, kOnnxDomain, 11, 12, kRo...
// 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/scatter_nd.h" namespace onnxruntime { namespace cuda { class ScatterN...
// 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/scatter_nd.h" namespace onnxruntime { namespace rocm { class ScatterN...
// 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 { Status ScatterNDImpl( cudaStream_t stream, void* output_data, const size_t element_size, const...
// 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 { Status ScatterNDImpl( hipStream_t stream, void* output_data, const size_t element_size, const ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "sequence_op.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_KERNEL_EX( SequenceAt, kOnnxDomain, 11, kCudaExecutionProvider, (*KernelDefBuilder::Create()) .InputMemoryType(O...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "sequence_op.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_KERNEL_EX( SequenceAt, kOnnxDomain, 11, kRocmExecutionProvider, (*KernelDefBuilder::Create()) .InputMemoryType(O...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/cpu/tensor/shape_op.h" #include "core/providers/cuda/cuda_fwd.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_VERSIONED_KERNEL_EX...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/cpu/tensor/shape_op.h" #include "core/providers/rocm/rocm_fwd.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_VERSIONED_KERNEL_EX...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/cpu/tensor/size.h" #include "core/providers/cuda/cuda_fwd.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_VERSIONED_KERNEL_EX( ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/cpu/tensor/size.h" #include "core/providers/rocm/rocm_fwd.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_VERSIONED_KERNEL_EX( ...
// 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/slice.h" #include "core/providers/cpu/tensor/utils.h" namespace onnxruntime { namesp...
// 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/slice.h" #include "core/providers/cpu/tensor/utils.h" namespace onnxruntime { namesp...
// 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 { Status SliceImpl(cudaStream_t stream, const size_t element_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 { Status SliceImpl(hipStream_t stream, const size_t element_size, ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "constant_of_shape.h" using namespace ::onnxruntime::common; using namespace ONNX_NAMESPACE; namespace onnxruntime { namespace cuda { ONNX_OPERATOR_KERNEL_EX( ConstantOfShape, kOnnxDomain, 9, kCud...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "constant_of_shape.h" using namespace ::onnxruntime::common; using namespace ONNX_NAMESPACE; namespace onnxruntime { namespace rocm { ONNX_OPERATOR_KERNEL_EX( ConstantOfShape, kOnnxDomain, 9, kRoc...
// 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/space_depth_ops.h" namespace onnxruntime { namespace cuda { class SpaceToDepth final : public CudaKernel, SpaceDepthBase { p...
// 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/space_depth_ops.h" namespace onnxruntime { namespace rocm { class SpaceToDepth final : public RocmKernel, SpaceDepthBase { p...
// 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/split.h" namespace onnxruntime { namespace cuda { class SplitKernel : 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/split.h" namespace onnxruntime { namespace rocm { class SplitKernel : public RocmKe...
// 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 OutputDataArray> Status SplitSameSplitDi...
// 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 OutputDataArray> Status SplitSameSplitDi...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "squeeze.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_VERSIONED_KERNEL_EX( Squeeze, kOnnxDomain, 1, 10, kCudaExecutionProvider, (*KernelDefBuilder::Create()) .Alias(0, 0)...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "squeeze.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_VERSIONED_KERNEL_EX( Squeeze, kOnnxDomain, 1, 10, 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" #include "core/providers/cpu/tensor/squeeze.h" namespace onnxruntime { namespace cuda { class Squeeze final : public Sq...
// 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/squeeze.h" namespace onnxruntime { namespace rocm { class Squeeze final : public Sq...
// 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/tile.h" namespace onnxruntime { namespace cuda { struct Tile final : CudaKernel { ...
// 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/tile.h" namespace onnxruntime { namespace rocm { struct Tile final : RocmKernel { ...
// 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 TileImpl(cudaStream_t stream, const size_t shape_rank, const TAr...
// 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 TileImpl(hipStream_t stream, const size_t shape_rank, const TArr...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/shared_library/provider_api.h" #include "core/common/gsl.h" #include "core/providers/cuda/cuda_kernel.h" #include "core/providers/cpu/tensor/transpose.h" namespace onnxruntime { name...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/shared_library/provider_api.h" #include "core/common/gsl.h" #include "core/providers/rocm/rocm_kernel.h" #include "core/providers/cpu/tensor/transpose.h" namespace onnxruntime { name...
// 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 { bool CanDoTranspose3D(const cudaDeviceProp& prop, size_t rank, const ...
// 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 { bool CanDoTranspose3D(const hipDeviceProp_t& prop, size_t rank, const...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/tensor/trilu.h" #include "core/providers/cuda/tensor/trilu_impl.h" #include "core/providers/cpu/tensor/utils.h" using namespace onnxruntime::common; namespace onnxruntime { namespace cuda { ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/rocm/tensor/trilu.h" #include "core/providers/rocm/tensor/trilu_impl.h" #include "core/providers/cpu/tensor/utils.h" using namespace onnxruntime::common; 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 "core/providers/cpu/generator/constant_of_shape_base.h" #include "core/providers/cuda/shared_inc/cuda_utils.h" namespace onnxruntime { namespace cuda { ...
// 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/generator/constant_of_shape_base.h" #include "core/providers/rocm/shared_inc/rocm_utils.h" namespace onnxruntime { namespace rocm { ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/cuda_kernel.h" namespace onnxruntime { namespace cuda { class Trilu final : public CudaKernel { public: Trilu(const OpKernelInfo& info) : CudaKernel(info), upper_(info.GetAttrOrDefault<in...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/rocm/rocm_kernel.h" namespace onnxruntime { namespace rocm { class Trilu final : public RocmKernel { public: Trilu(const OpKernelInfo& info) : RocmKernel(info), upper_(info.GetAttrOrDefault<in...
// 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 { Status TriluImpl( cudaStream_t stream, bool upper, size_t element_size, 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 { Status TriluImpl( hipStream_t stream, bool upper, size_t element_size, int6...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/tensor/unsqueeze.h" namespace onnxruntime { namespace cuda { ONNX_OPERATOR_VERSIONED_KERNEL_EX( Unsqueeze, kOnnxDomain, 1, 10, kCudaExecutionProvider, (*KernelDefBuilder:...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/rocm/tensor/unsqueeze.h" namespace onnxruntime { namespace rocm { ONNX_OPERATOR_VERSIONED_KERNEL_EX( Unsqueeze, kOnnxDomain, 1, 10, kRocmExecutionProvider, (*KernelDefBuilder:...
// 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/unsqueeze.h" namespace onnxruntime { namespace cuda { class Unsqueeze final : publi...
// 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/unsqueeze.h" namespace onnxruntime { namespace rocm { class Unsqueeze final : publi...
// 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/upsamplebase.h" namespace onnxruntime { namespace cuda { template <ty...
// 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/upsamplebase.h" namespace onnxruntime { namespace rocm { template <ty...
// 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" namespace onnxruntime { namespace cuda { templat...
// 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" namespace onnxruntime { namespace rocm { templat...
// 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 { template <typename T> class Where final : public CudaKernel { public: Where...
// 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 { template <typename T> class Where final : public RocmKernel { public: Where...
// 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 T> void WhereImpl( cudaStream_t stre...
// 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 T> void WhereImpl( hipStream_t strea...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef NDEBUG namespace onnxruntime { namespace cuda { namespace test { // Test header provides function declarations in EP-side bridge. bool TestDeferredRelease(); bool TestDeferredReleaseWithoutArena(); bool TestBeamSea...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef NDEBUG namespace onnxruntime { namespace rocm { namespace test { // Test header provides function declarations in EP-side bridge. bool TestDeferredRelease(); bool TestDeferredReleaseWithoutArena(); bool TestBeamSea...
#ifndef NDEBUG #include <iostream> #include "core/providers/cuda/test/all_tests.h" #include "core/providers/cuda/cuda_execution_provider.h" #include "core/providers/cuda/cuda_allocator.h" #include "core/providers/cuda/cuda_stream_handle.h" namespace onnxruntime { namespace cuda { namespace test { bool TestDefe...
#ifndef NDEBUG #include <iostream> #include "core/providers/rocm/test/all_tests.h" #include "core/providers/rocm/rocm_execution_provider.h" #include "core/providers/rocm/rocm_allocator.h" #include "core/providers/rocm/rocm_stream_handle.h" namespace onnxruntime { namespace rocm { namespace test { bool TestDefe...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/framework/random_generator.h" namespace onnxruntime { namespace cuda { #define RANDOM_KERNEL_DECLARE(name) \ templat...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/framework/random_generator.h" namespace onnxruntime { namespace rocm { #define RANDOM_KERNEL_DECLARE(name) \ templat...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/cuda_common.h" #include <cuda.h> namespace onnxruntime { namespace cuda { struct TritonKernelMetaData { int num_warps; int shared_mem_size; CUfunction func; std::unorde...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/rocm_common.h" #include <hip/hip_runtime.h> namespace onnxruntime { namespace rocm { struct TritonKernelMetaData { int num_warps; int shared_mem_size; hipFunction_t func;...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "activations.h" #include "core/framework/op_kernel.h" using namespace onnxruntime::cuda; namespace onnxruntime { namespace contrib { namespace cuda { #define REGISTER_ACTIVATION_KERNEL(x, ver, domain, T) ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "activations.h" #include "core/framework/op_kernel.h" using namespace onnxruntime::rocm; namespace onnxruntime { namespace contrib { namespace rocm { #define REGISTER_ACTIVATION_KERNEL(x, ver, domain, T) ...
// 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/unary_elementwise_ops.h" #include "core/providers/cuda/math/binary_elementwise_ops.h" #include "core/providers/cuda/activation/a...
// 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/unary_elementwise_ops.h" #include "core/providers/rocm/math/binary_elementwise_ops.h" #include "core/providers/rocm/activation/a...
#include <cuda_runtime.h> #include "activations_impl.h" #include "core/providers/cuda/cu_inc/common.cuh" #include "core/providers/cuda/cu_inc/unary_elementwise_impl.cuh" using namespace onnxruntime::cuda; namespace onnxruntime { namespace contrib { namespace cuda { template <typename T> struct OP_Affine : public Ctx...
#include <hip/hip_runtime.h> #include "activations_impl.h" #include "core/providers/rocm/cu_inc/common.cuh" #include "core/providers/rocm/cu_inc/unary_elementwise_impl.cuh" using namespace onnxruntime::rocm; namespace onnxruntime { namespace contrib { namespace rocm { template <typename T> struct OP_Affine : public ...
// 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 contrib { namespace cuda { typedef onnxruntime::cuda::CtxAlphaBeta CtxAffine; typedef onnxruntime::cuda::CtxAlph...
// 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 contrib { namespace rocm { typedef onnxruntime::rocm::CtxAlphaBeta CtxAffine; typedef onnxruntime::rocm::CtxAlph...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "contrib_ops/cpu/aten_ops/aten_op.h" namespace onnxruntime { namespace contrib { namespace cuda { ONNX_OPERATOR_KERNEL_EX( ATen, kPytorchAtenDomain, 1,...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "contrib_ops/cpu/aten_ops/aten_op.h" namespace onnxruntime { namespace contrib { namespace rocm { ONNX_OPERATOR_KERNEL_EX( ATen, kPytorchAtenDomain, 1,...
#pragma once #include "core/providers/cuda/shared_inc/cuda_utils.h" namespace onnxruntime { namespace contrib { namespace cuda { template <typename T> void LaunchAddBiasTranspose( cudaStream_t stream, const int num_matrices, const int format, const int max_threads_per_block, const int batch_size...
#pragma once #include "core/providers/rocm/shared_inc/rocm_utils.h" namespace onnxruntime { namespace contrib { namespace rocm { template <typename T> void LaunchAddBiasTranspose( hipStream_t stream, const int num_matrices, const int format, const int max_threads_per_block, const int batch_size,...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/shared_inc/cuda_utils.h" #include <cuda_fp16.h> #include <cublas_v2.h> namespace onnxruntime { namespace contrib { namespace cuda { // Build token indice for non-padding tokens ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/shared_inc/rocm_utils.h" #include <hip/hip_fp16.h> #include <rocblas/rocblas.h> namespace onnxruntime { namespace contrib { namespace rocm { // Build token indice for non-paddin...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class Decod...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class Decod...
#include "core/providers/cuda/cuda_common.h" #include "contrib_ops/cpu/bert/embed_layer_norm_helper.h" #include "embed_layer_norm.h" #include "embed_layer_norm_impl.h" namespace onnxruntime { namespace contrib { namespace cuda { #define REGISTER_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( ...
#include "core/providers/rocm/rocm_common.h" #include "contrib_ops/cpu/bert/embed_layer_norm_helper.h" #include "embed_layer_norm.h" #include "embed_layer_norm_impl.h" namespace onnxruntime { namespace contrib { 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/providers/cuda/cuda_kernel.h" namespace onnxruntime { namespace cuda { class Range final : public CudaKernel { public: explicit Range(const OpKernelInfo& info) : CudaKernel(info) {} Sta...
// 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 Range final : public RocmKernel { public: explicit Range(const OpKernelInfo& info) : RocmKernel(info) {} Sta...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/cuda_kernel.h" namespace onnxruntime { namespace contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class EmbedLayerNorm final : public CudaKer...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/rocm_kernel.h" namespace onnxruntime { namespace contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class EmbedLayerNorm final : public RocmKer...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" namespace onnxruntime { namespace contrib { namespace cuda { Status LaunchEmbedLayerNormKernel(cudaStream_t stream, void* output, ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" namespace onnxruntime { namespace contrib { namespace rocm { Status LaunchEmbedLayerNormKernel(hipStream_t stream, void* output, ...
// 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 "contrib_ops/cpu/bert/longformer_attention_base.h" namespace onnxruntime { namespace contrib { namespace cuda { using na...
// 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 "contrib_ops/cpu/bert/longformer_attention_base.h" namespace onnxruntime { namespace contrib { namespace rocm { using na...
// 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 contrib { namespace cuda { size_t GetPinnedBufferSize( size_t batch_size); size_t GetLongformerAttentionWorkspace...
// 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 contrib { namespace rocm { size_t GetPinnedBufferSize( size_t batch_size); size_t GetLongformerAttentionWorkspace...
/* Copyright (c) NVIDIA Corporation and Microsoft Corporation 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 law or a...
/* Copyright (c) NVIDIA Corporation and Microsoft Corporation 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 law or a...
/* Copyright (c) NVIDIA Corporation and Microsoft Corporation 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 law or a...
#include "hip/hip_runtime.h" /* Copyright (c) NVIDIA Corporation and Microsoft Corporation 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 re...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once namespace onnxruntime { namespace contrib { namespace cuda { // Size of global Index scratch in bytes. size_t GetGlobalScratchSize(int sequence_length); // Find the global attention indices and number of gl...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once namespace onnxruntime { namespace contrib { namespace rocm { // Size of global Index scratch in bytes. size_t GetGlobalScratchSize(int sequence_length); // Find the global attention indices and number of gl...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/cuda_common.h" #include "ngram_repeat_block.h" #include "ngram_repeat_block_impl.h" namespace onnxruntime { namespace contrib { namespace cuda { ONNX_OPERATOR_KERNEL_EX( NGramRepeatBlock...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/rocm/rocm_common.h" #include "ngram_repeat_block.h" #include "ngram_repeat_block_impl.h" namespace onnxruntime { namespace contrib { namespace rocm { ONNX_OPERATOR_KERNEL_EX( NGramRepeatBlock...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; class NGramRepeatBlock final : pu...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; class NGramRepeatBlock final : pu...
/* Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ /* Kernel implementation for blocking repeated n-grams. */ #include "core/providers/cuda/cu_inc/common.cuh" #include "contrib_ops/cuda/bert/ngram_repeat_block_impl.h" namespace onnxruntime { namespace contrib { namespace cuda { using namesp...
#include "hip/hip_runtime.h" /* Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ /* Kernel implementation for blocking repeated n-grams. */ #include "core/providers/rocm/cu_inc/common.cuh" #include "contrib_ops/rocm/bert/ngram_repeat_block_impl.h" namespace onnxruntime { namespace contrib { n...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <cub/cub.cuh> #include <cublas_v2.h> #include <cuda_fp16.h> #include "core/providers/cuda/cu_inc/common.cuh" #include "core/providers/cuda/cuda_common.h" #include "range_impl.h" using namespace onnxruntime::cuda;...
#include "hip/hip_runtime.h" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <hipcub/hipcub.hpp> #include <rocblas/rocblas.h> #include <hip/hip_fp16.h> #include "core/providers/rocm/cu_inc/common.cuh" #include "core/providers/rocm/rocm_common.h" #include "range...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; void NGramRepeatBlockImpl( cudaStream_t stream, ...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; void NGramRepeatBlockImpl( hipStream_t stream, ...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class Remov...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class Remov...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/cuda/cuda_common.h" #include "contrib_ops/cuda/bert/restore_padding.h" #include "contrib_ops/cuda/bert/bert_padding.h" namespace onnxruntime { namespace contrib { namespace cuda { #define REGISTE...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/rocm/rocm_common.h" #include "contrib_ops/rocm/bert/restore_padding.h" #include "contrib_ops/rocm/bert/bert_padding.h" namespace onnxruntime { namespace contrib { namespace rocm { #define REGISTE...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class Resto...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class Resto...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/cuda_common.h" namespace onnxruntime { namespace contrib { namespace cuda { // A wrapper class of cudaEvent_t to destroy the event automatically for avoiding memory leak. class...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/rocm_common.h" namespace onnxruntime { namespace contrib { namespace rocm { // A wrapper class of hipEvent_t to destroy the event automatically for avoiding memory leak. class ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #if defined(USE_MPI) #define OMPI_SKIP_MPICXX 1 // See https://github.com/open-mpi/ompi/issues/5157 #include <mpi.h> #undef OMPI_SKIP_MPICXX namespace onnxruntime { #if defined(USE_MPI) #define MPI_CHECK(c...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #if defined(USE_MPI) #define OMPI_SKIP_MPICXX 1 // See https://github.com/open-mpi/ompi/issues/5157 #include <mpi.h> #undef OMPI_SKIP_MPICXX namespace onnxruntime { #if defined(USE_MPI) #define MPI_CHECK(c...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/cuda_kernel.h" #if defined(ORT_USE_NCCL) #include <nccl.h> #endif namespace onnxruntime { namespace contrib { namespace cuda { // ---------------------------------------------...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/rocm_kernel.h" #if defined(ORT_USE_NCCL) #include <rccl/rccl.h> #endif namespace onnxruntime { namespace contrib { namespace rocm { // ----------------------------------------...
#include "core/providers/cuda/cuda_common.h" #include "contrib_ops/cuda/diffusion/bias_add.h" #include "contrib_ops/cuda/diffusion/bias_add_impl.h" namespace onnxruntime { namespace contrib { namespace cuda { #define REGISTER_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( BiasAd...
#include "core/providers/rocm/rocm_common.h" #include "contrib_ops/rocm/diffusion/bias_add.h" #include "contrib_ops/rocm/diffusion/bias_add_impl.h" namespace onnxruntime { namespace contrib { namespace rocm { #define REGISTER_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( BiasAd...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class BiasA...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class BiasA...
#include <cub/cub.cuh> #include "core/providers/cuda/cu_inc/common.cuh" #include "contrib_ops/cuda/diffusion/bias_add_impl.h" using namespace onnxruntime::cuda; namespace onnxruntime { namespace contrib { namespace cuda { template <typename T, int32_t C, int32_t TPB> __global__ void BiasAddKernel(T const* input, T...
#include "hip/hip_runtime.h" #include <hipcub/hipcub.hpp> #include "core/providers/rocm/cu_inc/common.cuh" #include "contrib_ops/rocm/diffusion/bias_add_impl.h" using namespace onnxruntime::rocm; namespace onnxruntime { namespace contrib { namespace rocm { template <typename T, int32_t C, int32_t TPB> __global__ v...
// 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 T> Status RangeImpl(cudaStream_t stream, const T start, const T delta, const int count, T* o...
// 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 T> Status RangeImpl(hipStream_t stream, const T start, const T delta, const int count, T* ou...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" #include "core/common/status.h" #include <cuda.h> namespace onnxruntime { namespace contrib { namespace cuda { template <typename T> void LaunchBiasAddKernel(cudaStream_t stre...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" #include "core/common/status.h" #include <hip/hip_runtime.h> namespace onnxruntime { namespace contrib { namespace rocm { template <typename T> void LaunchBiasAddKernel(hipStr...
#include "core/providers/cuda/cuda_common.h" #include "contrib_ops/cuda/diffusion/bias_split_gelu.h" #include "contrib_ops/cuda/diffusion/bias_split_gelu_impl.h" namespace onnxruntime { namespace contrib { namespace cuda { #define REGISTER_KERNEL_TYPED(T) ONNX_OPERATOR_TYPED_KERNEL_EX( ...
#include "core/providers/rocm/rocm_common.h" #include "contrib_ops/rocm/diffusion/bias_split_gelu.h" #include "contrib_ops/rocm/diffusion/bias_split_gelu_impl.h" namespace onnxruntime { namespace contrib { 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" namespace onnxruntime { namespace contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class BiasS...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class BiasS...
#include <cub/cub.cuh> #include "core/providers/cuda/cu_inc/common.cuh" #include "contrib_ops/cuda/diffusion/bias_split_gelu_impl.h" using namespace onnxruntime::cuda; namespace onnxruntime { namespace contrib { namespace cuda { template <typename T, int32_t HHS, int32_t TPB> __global__ void biasSplitGeluKernel(T ...
#include "hip/hip_runtime.h" #include <hipcub/hipcub.hpp> #include "core/providers/rocm/cu_inc/common.cuh" #include "contrib_ops/rocm/diffusion/bias_split_gelu_impl.h" using namespace onnxruntime::rocm; namespace onnxruntime { namespace contrib { namespace rocm { template <typename T, int32_t HHS, int32_t TPB> __g...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" #include "core/common/status.h" #include <cuda.h> namespace onnxruntime { namespace contrib { namespace cuda { template <typename T> void LaunchBiasSplitGeluKernel(cudaStream_...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/common/common.h" #include "core/common/status.h" #include <hip/hip_runtime.h> namespace onnxruntime { namespace contrib { namespace rocm { template <typename T> void LaunchBiasSplitGeluKernel(...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; class GroupNorm final : public Cu...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; class GroupNorm final : public Ro...
// 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 contrib { namespace cuda { using namespace onnxruntime::cuda; template <typename T> class Grid...
// 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 contrib { namespace rocm { using namespace onnxruntime::rocm; template <typename T> class Grid...
// 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 contrib { namespace cuda { template <typename T> void GridSampleImpl( cudaStream_t stream, const T* input_data...
// 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 contrib { namespace rocm { template <typename T> void GridSampleImpl( hipStream_t stream, const T* input_data,...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/cuda/nn/layer_norm.h" #include "core/providers/cuda/cuda_common.h" namespace onnxruntime { namespace contrib { namespace cuda { // LayerNor...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "core/providers/shared_library/provider_api.h" #include "core/providers/rocm/nn/layer_norm.h" #include "core/providers/rocm/rocm_common.h" namespace onnxruntime { namespace contrib { namespace rocm { // LayerNor...
// 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/cuda_common.h" #include "core/framework/random_generator.h" using namespace onnxruntime::cuda; namespace onnxruntime { namespace co...
// 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/rocm_common.h" #include "core/framework/random_generator.h" using namespace onnxruntime::rocm; namespace onnxruntime { namespace co...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/math/binary_elementwise_ops_impl.h" namespace onnxruntime { namespace cuda { // define the device functors that perform the computation on scalars #define OP_FUNCTOR_DEFINITIO...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/math/binary_elementwise_ops_impl.h" namespace onnxruntime { namespace rocm { // define the device functors that perform the computation on scalars #define OP_FUNCTOR_DEFINITIO...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "contrib_ops/cuda/math/bias_softmax.h" #include "core/providers/cuda/cuda_common.h" #include "contrib_ops/cuda/math/bias_softmax_impl.h" using namespace onnxruntime; using namespace onnxruntime::cuda; using name...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "contrib_ops/rocm/math/bias_softmax.h" #include "core/providers/rocm/rocm_common.h" #include "contrib_ops/rocm/math/bias_softmax_impl.h" using namespace onnxruntime; using namespace onnxruntime::rocm; using name...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/cuda/cuda_kernel.h" namespace onnxruntime { namespace contrib { namespace cuda { // BiasSoftmax follows the OpSet-11 definision of Softmax Op, that is, the input will be coerced to ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/providers/rocm/rocm_kernel.h" namespace onnxruntime { namespace contrib { namespace rocm { // BiasSoftmax follows the OpSet-11 definision of Softmax Op, that is, the input will be coerced to ...
// 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 contrib { namespace cuda { template <typename T> Status BiasSoftmaxImpl(...
// 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 contrib { namespace rocm { template <typename T> Status BiasSoftmaxImpl(...
#include "contrib_ops/cuda/math/binary_elementwise_ops.h" #include "contrib_ops/cuda/math/binary_elementwise_ops_impl.h" using namespace onnxruntime::common; namespace onnxruntime { namespace contrib { namespace cuda { #define CONTRIB_BINARY_ELEMENTWISE_REGISTER_KERNEL_TYPED(x, ver, T) ONNX_OPERATOR_TYP...
#include "contrib_ops/rocm/math/binary_elementwise_ops.h" #include "contrib_ops/rocm/math/binary_elementwise_ops_impl.h" using namespace onnxruntime::common; namespace onnxruntime { namespace contrib { namespace rocm { #define CONTRIB_BINARY_ELEMENTWISE_REGISTER_KERNEL_TYPED(x, ver, T) ONNX_OPERATOR_TYP...