-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A compile error of k2/k2/csrc/cuda/ops_test.cu #96
Comments
Ah, should be c->IsCompatible(). You can make a PR if you want. Just be
aware, we will likely change the license from Apache->MIT (they are very
similar), so make sure you're OK with that.
…On Fri, Aug 28, 2020 at 11:18 AM Jarvan-Wang ***@***.***> wrote:
OS version is Linux 3.10.0-957.el7.x86_64
nvcc is 10.2
gcc is 6.3.1
Error is here:
`
[ 94%] Building CUDA object k2/csrc/cuda/CMakeFiles/ops_test.dir/ops_test.cu.o
cd /search/odin/wangjiawen/k2/build/k2/csrc/cuda && /usr/local/cuda-10.2/bin/nvcc -forward-unknown-to-host-compiler -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -I/search/odin/wangjiawen/k2 -I/search/odin/wangjiawen/k2/build/_deps/cub-src -I/search/odin/wangjiawen/k2/build/_deps/glog_glog-build -I/search/odin/wangjiawen/k2/build/_deps/glog_glog-src/src -I/search/odin/wangjiawen/k2/build/_deps/googletest-src/googlemock/include -isystem=/search/odin/wangjiawen/k2/build/_deps/googletest-src/googletest/include -isystem=/search/odin/wangjiawen/k2/build/_deps/googletest-src/googletest --expt-extended-lambda -gencode arch=compute_30,code=sm_30 --expt-extended-lambda -gencode arch=compute_32,code=sm_32 --expt-extended-lambda -gencode arch=compute_35,code=sm_35 --expt-extended-lambda -gencode arch=compute_50,code=sm_50 --expt-extended-lambda -gencode arch=compute_52,code=sm_52 --expt-extended-lambda -gencode arch=compute_53,code=sm_53 --expt-extended-lambda -gencode arch=compute_60,code=sm_60 --expt-extended-lambda -gencode arch=compute_61,code=sm_61 --expt-extended-lambda -gencode arch=compute_62,code=sm_62 --expt-extended-lambda -gencode arch=compute_70,code=sm_70 --expt-extended-lambda -gencode arch=compute_72,code=sm_72 -g -std=c++14 -x cu -c /search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu -o CMakeFiles/ops_test.dir/ops_test.cu.o
/search/odin/wangjiawen/k2/k2/csrc/cuda/ops.h(79): error: class "std::shared_ptr<k2::Context>" has no member "IsCompatible"
detected during instantiation of "void k2::GpuTransposeTest<T>(int32_t, int32_t, int32_t, __nv_bool) [with T=int32_t]"
/search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu(80): here
/search/odin/wangjiawen/k2/k2/csrc/cuda/ops.h(80): error: class "std::shared_ptr<k2::Context>" has no member "IsCompatible"
detected during instantiation of "void k2::GpuTransposeTest<T>(int32_t, int32_t, int32_t, __nv_bool) [with T=int32_t]"
/search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu(80): here
`
which cause by:
template <typename T> void Transpose(ContextPtr &c, const Array2<T> &src,
Array2<T> *dest) { assert(c.IsCompatible(src.Context()));
assert(c.IsCompatible(dest->Context())); //...
the c is get by std::make_shared
as i known, this syntax is supported by c++11 and above
and i passed -std=c++14 to nvcc, so, its weird..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/danpovey/k2/issues/96>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFLO6L7KCOC3ZMMTOZRCDSC4O2BANCNFSM4QNVIHPA>
.
|
forget the MIT thing, looks like it already is.
…On Fri, Aug 28, 2020 at 11:34 AM Daniel Povey ***@***.***> wrote:
Ah, should be c->IsCompatible(). You can make a PR if you want. Just be
aware, we will likely change the license from Apache->MIT (they are very
similar), so make sure you're OK with that.
On Fri, Aug 28, 2020 at 11:18 AM Jarvan-Wang ***@***.***>
wrote:
> OS version is Linux 3.10.0-957.el7.x86_64
> nvcc is 10.2
> gcc is 6.3.1
>
> Error is here:
> `
>
> [ 94%] Building CUDA object k2/csrc/cuda/CMakeFiles/ops_test.dir/ops_test.cu.o
>
> cd /search/odin/wangjiawen/k2/build/k2/csrc/cuda && /usr/local/cuda-10.2/bin/nvcc -forward-unknown-to-host-compiler -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -I/search/odin/wangjiawen/k2 -I/search/odin/wangjiawen/k2/build/_deps/cub-src -I/search/odin/wangjiawen/k2/build/_deps/glog_glog-build -I/search/odin/wangjiawen/k2/build/_deps/glog_glog-src/src -I/search/odin/wangjiawen/k2/build/_deps/googletest-src/googlemock/include -isystem=/search/odin/wangjiawen/k2/build/_deps/googletest-src/googletest/include -isystem=/search/odin/wangjiawen/k2/build/_deps/googletest-src/googletest --expt-extended-lambda -gencode arch=compute_30,code=sm_30 --expt-extended-lambda -gencode arch=compute_32,code=sm_32 --expt-extended-lambda -gencode arch=compute_35,code=sm_35 --expt-extended-lambda -gencode arch=compute_50,code=sm_50 --expt-extended-lambda -gencode arch=compute_52,code=sm_52 --expt-extended-lambda -gencode arch=compute_53,code=sm_53 --expt-extended-lambda -gencode arch=compute_60,code=sm_60 --expt-extended-lambda -gencode arch=compute_61,code=sm_61 --expt-extended-lambda -gencode arch=compute_62,code=sm_62 --expt-extended-lambda -gencode arch=compute_70,code=sm_70 --expt-extended-lambda -gencode arch=compute_72,code=sm_72 -g -std=c++14 -x cu -c /search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu -o CMakeFiles/ops_test.dir/ops_test.cu.o
>
> /search/odin/wangjiawen/k2/k2/csrc/cuda/ops.h(79): error: class "std::shared_ptr<k2::Context>" has no member "IsCompatible"
>
> detected during instantiation of "void k2::GpuTransposeTest<T>(int32_t, int32_t, int32_t, __nv_bool) [with T=int32_t]"
>
> /search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu(80): here
>
> /search/odin/wangjiawen/k2/k2/csrc/cuda/ops.h(80): error: class "std::shared_ptr<k2::Context>" has no member "IsCompatible"
>
> detected during instantiation of "void k2::GpuTransposeTest<T>(int32_t, int32_t, int32_t, __nv_bool) [with T=int32_t]"
>
> /search/odin/wangjiawen/k2/k2/csrc/cuda/ops_test.cu(80): here
>
> `
>
> which cause by:
> template <typename T> void Transpose(ContextPtr &c, const Array2<T> &src,
> Array2<T> *dest) { assert(c.IsCompatible(src.Context()));
> assert(c.IsCompatible(dest->Context())); //...
> the c is get by std::make_shared
> as i known, this syntax is supported by c++11 and above
> and i passed -std=c++14 to nvcc, so, its weird..
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/danpovey/k2/issues/96>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAZFLO6L7KCOC3ZMMTOZRCDSC4O2BANCNFSM4QNVIHPA>
> .
>
|
Jarvan-Wang
added a commit
to Jarvan-Wang/k2
that referenced
this issue
Aug 28, 2020
* Fix syntax error of ops_test.cu * Add a const version of k2::Array1::Context to fix quantifier error of array.h
It's weird that the code can be compiled successfully on my machine ( |
Probably it was a template that was never instantiated, different compilers
handle that differently.
…On Fri, Aug 28, 2020 at 12:44 PM Haowen Qiu ***@***.***> wrote:
It's weird that the code can be compiled successfully on my machine (gcc
(GCC) 4.8.5 and nvcc release 10.0)..
@danpovey <https://github.com/danpovey> maybe we should update gcc
version on Xiaomi cluster.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/danpovey/k2/issues/96#issuecomment-682321810>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFLOZZVBZH23X52LRZQNLSC4Y4FANCNFSM4QNVIHPA>
.
|
No, it has been instantiated in ops_test.cu..that's really strange. The current code in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OS version is Linux 3.10.0-957.el7.x86_64
nvcc is 10.2
gcc is 6.3.1
Error is here:
``
which cause by:
template <typename T> void Transpose(ContextPtr &c, const Array2<T> &src, Array2<T> *dest) { assert(c.IsCompatible(src.Context())); assert(c.IsCompatible(dest->Context())); //...
the c is get by std::make_shared
as i known, this syntax is supported by c++11 and above
and i passed -std=c++14 to nvcc, so, its weird..
The text was updated successfully, but these errors were encountered: