Skip to content
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

How to execute? #1

Open
asherliu opened this issue Dec 21, 2021 · 7 comments
Open

How to execute? #1

asherliu opened this issue Dec 21, 2021 · 7 comments

Comments

@asherliu
Copy link

Can you add some sampled data and instructions about how to run this code?

@lloo099
Copy link

lloo099 commented Sep 2, 2022

Hi @cctry, Thanks for your open-source works. Would you mind sharing ur detailed instructions? When I compiled these cuda codes, make -j failed after building successfully.

@cctry
Copy link
Owner

cctry commented Oct 11, 2022 via email

@lloo099
Copy link

lloo099 commented Oct 12, 2022

What are the errors? Shiyang Chen

On Sep 1, 2022, at 11:19 PM, Jiajun Thomas @.***> wrote:  Hi @cctry, Thanks for your open-source works. Would you mind sharing ur detailed instructions? When I compiled these cuda codes, make -j failed after building successfully. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

(base) jjc@f039447:~/E.T./build$ cmake .. 
-- The CUDA compiler identification is NVIDIA 11.4.120
-- The CXX compiler identification is GNU 9.4.0
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-11.4/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jjc/E.T./build
(base) jjc@f039447:~/E.T./build$ make -j
[ 13%] Building CUDA object encoder/CMakeFiles/encoder.dir/encoder.cu.o
[ 13%] Building CUDA object encoder/CMakeFiles/encoder.dir/Linear.cu.o
[ 13%] Building CUDA object kernels/CMakeFiles/kernels.dir/skip_layernorm.cu.o
[ 22%] Building CUDA object kernels/CMakeFiles/kernels.dir/attention.cu.o
[ 22%] Building CUDA object kernels/CMakeFiles/kernels.dir/linear.cu.o
/home/jjc/E.T./kernels/skip_layernorm.cu(4): error: attributes are not permitted in a function definition

/home/jjc/E.T./kernels/skip_layernorm.cu(4): error: expected a "{"

/home/jjc/E.T./kernels/skip_layernorm.cu(13): error: identifier "in_out" is undefined

/home/jjc/E.T./kernels/skip_layernorm.cu(14): error: identifier "skip" is undefined

/home/jjc/E.T./kernels/skip_layernorm.cu(16): error: identifier "beta" is undefined

/home/jjc/E.T./kernels/skip_layernorm.cu(19): error: identifier "len" is undefined

/home/jjc/E.T./kernels/skip_layernorm.cu(109): error: identifier "skip_layernorm" is undefined

7 errors detected in the compilation of "/home/jjc/E.T./kernels/skip_layernorm.cu".
make[2]: *** [kernels/CMakeFiles/kernels.dir/build.make:76: kernels/CMakeFiles/kernels.dir/skip_layernorm.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/jjc/E.T./encoder/Linear.h(4): error: expected a "{"

/home/jjc/E.T./encoder/Linear.h(5): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(16): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(18): error: type name is not allowed

/home/jjc/E.T./encoder/Linear.h(18): error: expected a ")"

/home/jjc/E.T./encoder/Linear.h(18): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/Linear.h(21): error: expected a ";"

/home/jjc/E.T./encoder/Linear.h(26): warning: parsing restarts here after previous syntax error

/home/jjc/E.T./encoder/Linear.h(27): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(27): error: identifier "operator=" is undefined

/home/jjc/E.T./encoder/Linear.h(27): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(28): error: identifier "other" is undefined

/home/jjc/E.T./encoder/Linear.h(29): error: expected a ";"

/home/jjc/E.T./encoder/Linear.h(46): warning: parsing restarts here after previous syntax error

/home/jjc/E.T./encoder/Linear.h(7): warning: variable "out_feat" was declared but never referenced

/home/jjc/E.T./encoder/Linear.h(8): warning: variable "size" was declared but never referenced

/home/jjc/E.T./encoder/encoder.h(59): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(60): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(61): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(63): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(65): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(67): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(71): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(71): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(72): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(72): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(73): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(73): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(82): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(83): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(86): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(88): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(90): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(94): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(94): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(95): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(96): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(96): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(105): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(106): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(107): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(109): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(111): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(113): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(123): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(123): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(124): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(124): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(125): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.h(125): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(5): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(6): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(6): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(7): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(7): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(8): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(48): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(49): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(50): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(51): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(52): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(95): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(96): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(96): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(97): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(98): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/encoder.cu(99): error: identifier "Linear_tile" is undefined

63 errors detected in the compilation of "/home/jjc/E.T./encoder/encoder.cu".
make[2]: *** [encoder/CMakeFiles/encoder.dir/build.make:76: encoder/CMakeFiles/encoder.dir/encoder.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.h(91): error: expected a "{"

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.h(92): error: namespace definition is not allowed

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.h(267): warning: this pragma must immediately precede a statement

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: incomplete type is not allowed

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: identifier "fragment" is undefined

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: identifier "matrix_a" is undefined

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: type name is not allowed

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: identifier "row_major" is undefined

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: identifier "a" is undefined

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: expected an expression

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: type name is not allowed

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: expected a ")"

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(90): error: expected a ";"

/usr/local/cuda-11.4/bin/../targets/x86_64-linux/include/crt/mma.hpp(1110): warning: parsing restarts here after previous syntax error

/home/jjc/E.T./kernels/utils.h(34): error: namespace "nvcuda::wmma" has no member "fragment"

/home/jjc/E.T./kernels/utils.h(34): error: expected a ";"

/home/jjc/E.T./kernels/utils.h(36): error: namespace "nvcuda::wmma" has no member "fragment"

/home/jjc/E.T./kernels/utils.h(36): error: expected a ";"

/home/jjc/E.T./kernels/utils.h(38): error: namespace "nvcuda::wmma" has no member "fragment"

/home/jjc/E.T./kernels/utils.h(38): error: expected a ";"

/home/jjc/E.T./encoder/Linear.h(4): error: expected a "{"

/home/jjc/E.T./encoder/Linear.h(5): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(16): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(18): error: type name is not allowed

/home/jjc/E.T./encoder/Linear.h(18): error: expected a ")"

/home/jjc/E.T./encoder/Linear.h(18): error: identifier "Linear_tile" is undefined

/home/jjc/E.T./encoder/Linear.h(21): error: expected a ";"

/home/jjc/E.T./encoder/Linear.h(26): warning: parsing restarts here after previous syntax error

/home/jjc/E.T./encoder/Linear.h(27): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(27): error: identifier "operator=" is undefined

/home/jjc/E.T./encoder/Linear.h(27): error: expected an expression

/home/jjc/E.T./encoder/Linear.h(28): error: identifier "other" is undefined

/home/jjc/E.T./encoder/Linear.h(29): error: expected a ";"

/home/jjc/E.T./encoder/Linear.h(46): warning: parsing restarts here after previous syntax error

/home/jjc/E.T./encoder/Linear.h(7): warning: variable "out_feat" was declared but never referenced

/home/jjc/E.T./encoder/Linear.h(8): warning: variable "size" was declared but never referenced

/home/jjc/E.T./encoder/Linear.cu(30): warning: variable "endAlgo" was declared but never referenced

/home/jjc/E.T./encoder/Linear.cu(35): warning: variable "best_time" was declared but never referenced

/home/jjc/E.T./kernels/linear.cu(70): error: namespace "nvcuda::wmma" has no member "row_major"

/home/jjc/E.T./kernels/linear.cu(71): error: namespace "nvcuda::wmma" has no member "col_major"

/home/jjc/E.T./kernels/linear.cu(73): error: namespace "nvcuda::wmma" has no member "fill_fragment"

/home/jjc/E.T./kernels/linear.cu(79): error: namespace "nvcuda::wmma" has no member "mma_sync"

/home/jjc/E.T./kernels/linear.cu(82): error: namespace "nvcuda::wmma" has no member "store_matrix_sync"

/home/jjc/E.T./kernels/linear.cu(82): error: namespace "nvcuda::wmma" has no member "mem_row_major"

/home/jjc/E.T./kernels/linear.cu(120): error: namespace "nvcuda::wmma" has no member "row_major"

/home/jjc/E.T./kernels/linear.cu(121): error: namespace "nvcuda::wmma" has no member "col_major"

/home/jjc/E.T./kernels/linear.cu(123): error: namespace "nvcuda::wmma" has no member "fill_fragment"

/home/jjc/E.T./kernels/linear.cu(129): error: namespace "nvcuda::wmma" has no member "mma_sync"

/home/jjc/E.T./kernels/linear.cu(132): error: namespace "nvcuda::wmma" has no member "store_matrix_sync"

/home/jjc/E.T./kernels/linear.cu(132): error: namespace "nvcuda::wmma" has no member "mem_row_major"

30 errors detected in the compilation of "/home/jjc/E.T./kernels/linear.cu".
make[2]: *** [kernels/CMakeFiles/kernels.dir/build.make:90: kernels/CMakeFiles/kernels.dir/linear.cu.o] Error 1
12 errors detected in the compilation of "/home/jjc/E.T./encoder/Linear.cu".
make[2]: *** [encoder/CMakeFiles/encoder.dir/build.make:90: encoder/CMakeFiles/encoder.dir/Linear.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:164: encoder/CMakeFiles/encoder.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:138: kernels/CMakeFiles/kernels.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@lloo099
Copy link

lloo099 commented Oct 12, 2022

Cannot be compiled successfully.

@cctry
Copy link
Owner

cctry commented Oct 12, 2022

Cannot be compiled successfully.

What is gcc version? It is only tested with gcc-7.5 or higher.

@lloo099
Copy link

lloo099 commented Oct 12, 2022

Cannot be compiled successfully.

What is gcc version? It is only tested with gcc-7.5 or higher.

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

@cctry
Copy link
Owner

cctry commented Oct 12, 2022

It seems to me that the header files are not treated as CUDA code, including mine header and lib header. I am able to compile these files standalone. Maybe you can try to tweak CMake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants