Commit b128780e authored by tyhsu's avatar tyhsu

Add 'make prof' in Makefile to show detail of GPU activity

parent 6403ae80
......@@ -6,11 +6,12 @@
This version inherits the idea of current oai ldpc_decoder. It stores lots of LUTs and shrinks the cn, bnbuffer size comparing to the former implementation. Right now, it only supports the longest code block 8448.
### Usage
+ `make ldpc` will compile the program `ldpc`
+ `make ldpc` will compile the program `ldpc`.
+ `make prof [num=<0~100>]` will show the detail of GPU activity.
+ `make test` will build ldpc executable and run `check.sh` to verify the correctness of the implementation.
### Verification
+ The input (channel output) of the LDPC decoder is produced by the `ldpctest` program from OAI.
+ The verification is done by comparing the data decoded with the input data (channel output), and also the data output(`estimated_output`) produced by oai `ldpctest`
+ The verification is done by comparing the data decoded with the input data (channel output), and also the data output(`estimated_output`) produced by oai `ldpctest`.
......@@ -5,7 +5,7 @@ exec = ldpc
file = channel_output.txt
OBJS = util.o
code = 8448
num = 1
.PHONY: clean debug
......@@ -18,12 +18,14 @@ $(exec): $(exec).cu $(OBJS)
$(NVCC) $(CFLAGS) -o $@ $^
%.o: %.cu
cp ../test_input/8448/$(num).txt $(file)
$(NVCC) $(CFLAGS) -o $@ -c $<
run: clean $(exec)
./$(exec) -l $(code) -f $(file)
prof: clean $(exec)
cp ../test_input/8448/$(num).txt $(file)
$(PROF) ./$(exec) -l $(code) -f $(file)
test: clean $(exec)
......
EXEC = gen_idx
TXT = gen_matrix.txt
DEBUG = debug
FILE = channel_output.txt
num = 1
gen: clean gen_idx.c
$(CC) $(EXEC).c -o $(EXEC) -g
ldpc: clean ldpc.cu
cp ../test_input/8448/$(num).txt $(FILE)
nvcc ldpc.cu -o ldpc -g -G
mkdir debug
......@@ -13,11 +16,12 @@ test: ldpc
./check.sh
cgdb: clean ldpc
cuda-gdb --silent --args ldpc test_input.txt
cuda-gdb --silent --args ldpc $(FILE)
prof: clean ldpc
nvprof ./ldpc test_input.txt
cp ../test_input/8448/$(num).txt $(FILE)
nvprof ./ldpc $(FILE)
.PHONY: clean
clean:
$(RM) -rf $(DEBUG) $(EXEC) $(TXT) ldpc log.txt channel_output.txt
$(RM) -rf $(DEBUG) $(EXEC) $(TXT) ldpc log.txt $(FILE)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment