Closed matwhite closed 3 years ago
Sorry for that, would you try to add a new line #include "type_defs.h"
to warp-ctc/include/detail/reduce.h
, and make again.
#pragma once
template <typename T>
ctcStatus_t reduce_negate(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
template <typename T>
ctcStatus_t reduce_exp(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
template <typename T>
ctcStatus_t reduce_max(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
changes to
#pragma once
#include "type_defs.h"
template <typename T>
ctcStatus_t reduce_negate(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
template <typename T>
ctcStatus_t reduce_exp(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
template <typename T>
ctcStatus_t reduce_max(const T* input, T* output, int rows, int cols, bool axis, gpuStream_t stream);
I tried that, but it seems to have no effect. In an attempt to get it working I added #define gpuStream_t cudaStream_t
to reduce.h
and that worked, but that's not a real solution since it's a kludge, and it doesn't handle hip
.
Thanks for your try.
It seems using gpuStream_t = cudaStream_t;
does not work, and #define gpuStream_t cudaStream_t
does work?
So would you try add using gpuStream_t = cudaStream_t;
(not #define gpuStream_t cudaStream_t
) to reduce.h
, and it will failed as expected?
Or try changes type_defs.h
#pragma once
#if (defined(__HIPCC__) || defined(__CUDACC__))
#ifdef __HIPCC__
#include <hip/hip_runtime.h>
#else
#include <cuda_runtime.h>
#endif
#ifdef __HIPCC__
#define gpuSuccess hipSuccess
using gpuStream_t = hipStream_t;
using gpuError_t = hipError_t;
using gpuEvent_t = hipEvent_t;
#else
#define gpuSuccess cudaSuccess
using gpuStream_t = cudaStream_t;
using gpuError_t = cudaError_t;
using gpuEvent_t = cudaEvent_t;
#endif
#endif
to
#pragma once
#if (defined(__HIPCC__) || defined(__CUDACC__))
#ifdef __HIPCC__
#include <hip/hip_runtime.h>
#else
#include <cuda_runtime.h>
#endif
#ifdef __HIPCC__
#define gpuSuccess hipSuccess
using gpuStream_t = hipStream_t;
using gpuError_t = hipError_t;
using gpuEvent_t = hipEvent_t;
#else
#define gpuSuccess cudaSuccess
#define gpuStream_t cudaStream_t
// using gpuStream_t = cudaStream_t;
using gpuError_t = cudaError_t;
using gpuEvent_t = cudaEvent_t;
#endif
#endif
and it will success as expected?
And by the way, are you use cuda right now for this problem.
Sorry to ask you help me does this, due to I can not install torch successfully right now, so I can not build with torch.
The suggested changes did not work for me. I have run out of time to look at this issue, so I will close it out. Thank you for helping me take a look.
The prior PR seems to have missed a declaration. In compiling, I see the following error:
In reverting back to cd828e5b6c3b953b82af73f7f44cddc393a20efa, I am able to successfully build it.