apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

Home Page:https://mxnet.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mxnet 1.2.1 random_generator.h:154:5: error: there are no arguments to 'CUDA_CALL' that depend on a template parameter, so a declaration of 'CUDA_CALL' must be available [-fpermissive] CUDA_CALL(cudaMalloc(&inst->states_,

Kaiser-Yang opened this issue · comments

Description

when compiling mxnet 1.2.1, I found that there are some compilation errors.
I think these ERRORs are weird. It is described below.

Error Message

/src/common/random_generator.h:154:5: error: there are no arguments to 'CUDA_CALL' that depend on a template parameter, so a declaration of 'CUDA_CALL' must be available [-fpermissive]
CUDA_CALL(cudaMalloc(&inst->states_,

To Reproduce

clone mxnet-1.2.1 from github and set root/make/config.mk USE_CUDA CUDA_PATH USE_DIST_KVSTORE and enter root to start with command make

What have you tried to solve it?

I add the below code into random_generator.h
image

Environment

cuda-11.2
ubuntu 16.04

What perplexes me is the CUDA_CALL is define in ../common/cuda_utils.h, and included by random_generator.h but getting a compilation error

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

after adding this code, the problem is solved. So I wonder why this problem occurs even when including cuda_utils.h;
CUDA_CALL is defined in cuda_utils.h as below:
image