Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
71a8d19b
Commit
71a8d19b
authored
May 18, 2020
by
Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use of avx2 & avx512 at CN Processing level
parent
3ed622af
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
827 additions
and
129 deletions
+827
-129
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+8
-4
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
+6
-3
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/Makefile
...ODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/Makefile
+5
-5
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/cnProc_gen_avx2.c
...DPC_decoder/nrLDPC_tools/generator_avx2/cnProc_gen_avx2.c
+691
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/cnProc_gen_avx2.h
...DPC_decoder/nrLDPC_tools/generator_avx2/cnProc_gen_avx2.h
+6
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/main.c
.../CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/main.c
+17
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/Makefile
...ING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/Makefile
+27
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/cnProc_gen_avx512.c
...decoder/nrLDPC_tools/generator_avx512/cnProc_gen_avx512.c
+43
-37
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/cnProc_gen_avx512.h
...decoder/nrLDPC_tools/generator_avx512/cnProc_gen_avx512.h
+6
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/main.c
...ODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/main.c
+16
-0
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.h
...r/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.h
+2
-1
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/main.c
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/main.c
+0
-79
No files found.
cmake_targets/CMakeLists.txt
View file @
71a8d19b
...
...
@@ -1305,26 +1305,30 @@ set(PHY_TURBOIF
set
(
PHY_LDPC_ORIG_SRC
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_encoder/ldpc_encoder.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX2.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX512.c
)
set
(
PHY_LDPC_OPTIM_SRC
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX2.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX512.c
)
set
(
PHY_LDPC_OPTIM8SEG_SRC
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8seg.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX2.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX2.c
)
set
(
PHY_LDPC_OPTIM8SEGMULTI_SRC
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_encoder/ldpc_encoder_optim8segmulti.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX2.c
${
OPENAIR1_DIR
}
/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13_AVX512.c
)
set
(
PHY_NR_CODINGIF
...
...
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder.c
View file @
71a8d19b
...
...
@@ -147,7 +147,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif
if
(
BG
==
1
)
{
if
(
Z
==
384
){
nrLDPC_cnProc_BG1_Z384_13
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
nrLDPC_cnProc_BG1_Z384_13_AVX512
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
//nrLDPC_cnProc_BG1_Z384_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
}
else
{
nrLDPC_cnProc_BG1
(
p_lut
,
p_procBuf
,
Z
);
}
...
...
@@ -250,7 +251,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
if
(
BG
==
1
)
{
if
(
Z
==
384
){
nrLDPC_cnProc_BG1_Z384_13
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
nrLDPC_cnProc_BG1_Z384_13_AVX512
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
//nrLDPC_cnProc_BG1_Z384_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
}
else
{
nrLDPC_cnProc_BG1
(
p_lut
,
p_procBuf
,
Z
);
}
...
...
@@ -363,7 +365,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif
if
(
BG
==
1
)
{
if
(
Z
==
384
){
nrLDPC_cnProc_BG1_Z384_13
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
nrLDPC_cnProc_BG1_Z384_13_AVX512
(
p_procBuf
->
cnProcBuf
,
p_procBuf
->
cnProcBufRes
);
//nrLDPC_cnProc_BG1_Z384_13_AVX2(p_procBuf->cnProcBuf,p_procBuf->cnProcBufRes);
}
else
{
nrLDPC_cnProc_BG1
(
p_lut
,
p_procBuf
,
Z
);
}
...
...
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/Makefile
→
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/
generator_avx2/
Makefile
View file @
71a8d19b
C
=
gcc
CFLAGS
=
-W
-Wall
-mavx2
CFLAGS
=
-W
-Wall
-mavx2
LDFLAGS
=
EXEC
=
cnProc_gen
EXEC
=
cnProc_gen
_avx2
SRC
=
$(
wildcard
*
.c
)
OBJ
=
$(SRC:.c=.o)
all
:
$(EXEC)
cnProc_gen
:
$(OBJ)
cnProc_gen
_avx2
:
$(OBJ)
$(CC)
-o
$@
$^
$(LDFLAGS)
-O2
-pg
main.o
:
cnProc_gen.h
main.o
:
cnProc_gen
_avx2
.h
%.o
:
%.c
$(CC)
-o
$@
-c
$<
$(CFLAGS)
-I
${OPENAIR_HOME}
/openair1
-g
-pg
...
...
@@ -24,4 +24,4 @@ mrproper: clean
rm
-rf
$(EXEC)
zip
:
tar
-zcvf
sauvegarde.tar.gz main.c cnProc_gen
.c cnProc_geno
.h Makefile
tar
-zcvf
sauvegarde.tar.gz main.c cnProc_gen
_avx2.c cnProc_gen_avx2
.h Makefile
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/cnProc_gen_avx2.c
0 → 100644
View file @
71a8d19b
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/
cnProc_gen
.h
→
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/
generator_avx2/cnProc_gen_avx2
.h
View file @
71a8d19b
#ifndef NRLDPC_CN_GEN
#define NRLDPC_CN_GEN
void
nrLDPC_cnProc_BG1_generator
(
uint16_t
Z
,
int
R
);
void
nrLDPC_cnProc_BG1_generator
_AVX2
(
uint16_t
Z
,
int
R
);
#endif
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx2/main.c
0 → 100644
View file @
71a8d19b
#include <stdio.h>
#include <immintrin.h>
#include "../../nrLDPC_types.h"
#include "../../nrLDPC_init.h"
#include "../../nrLDPC_bnProc.h"
#include "cnProc_gen_avx2.h"
int
main
(
int
argc
,
char
*
argv
[])
{
// Z=384, R=1/3
nrLDPC_cnProc_BG1_generator_AVX2
(
384
,
0
);
return
(
0
);
}
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/Makefile
0 → 100644
View file @
71a8d19b
C
=
gcc
CFLAGS
=
-W
-Wall
LDFLAGS
=
EXEC
=
cnProc_gen_avx512
SRC
=
$(
wildcard
*
.c
)
OBJ
=
$(SRC:.c=.o)
all
:
$(EXEC)
cnProc_gen_avx512
:
$(OBJ)
$(CC)
-o
$@
$^
$(LDFLAGS)
-O2
-pg
main.o
:
cnProc_gen_avx512.h
%.o
:
%.c
$(CC)
-o
$@
-c
$<
$(CFLAGS)
-I
${OPENAIR_HOME}
/openair1
-g
-pg
.PHONY
:
clean mrproper
clean
:
rm
-rf
*
.o
mrproper
:
clean
rm
-rf
$(EXEC)
zip
:
tar
-zcvf
sauvegarde.tar.gz main.c cnProc_gen_avx512.c cnProc_gen_avx512.h Makefile
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/
cnProc_gen
.c
→
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/
generator_avx512/cnProc_gen_avx512
.c
View file @
71a8d19b
This diff is collapsed.
Click to expand it.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/cnProc_gen_avx512.h
0 → 100644
View file @
71a8d19b
#ifndef NRLDPC_CN_GEN
#define NRLDPC_CN_GEN
void
nrLDPC_cnProc_BG1_generator_AVX512
(
uint16_t
Z
,
int
R
);
#endif
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/generator_avx512/main.c
0 → 100644
View file @
71a8d19b
#include <stdio.h>
#include <immintrin.h>
//#include "../nrLDPCdecoder_defs.h"
#include "../../nrLDPC_types.h"
#include "../../nrLDPC_init.h"
#include "../../nrLDPC_bnProc.h"
#include "cnProc_gen_avx512.h"
int
main
(
int
argc
,
char
*
argv
[])
{
// Z=384, R=1/3
nrLDPC_cnProc_BG1_generator_AVX512
(
384
,
0
);
return
(
0
);
}
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/ldpc_gen_files/nrLDPC_cnProc_BG1_Z384_13.h
View file @
71a8d19b
#ifndef NR_CN_PROC_BG1_OPTIM
#define NR_CN_PROC_BG1_OPTIM
void
nrLDPC_cnProc_BG1_Z384_13
(
int8_t
*
cnProcBuf
,
int8_t
*
cnProcBufRes
);
void
nrLDPC_cnProc_BG1_Z384_13_AVX512
(
int8_t
*
cnProcBuf
,
int8_t
*
cnProcBufRes
);
void
nrLDPC_cnProc_BG1_Z384_13_AVX2
(
int8_t
*
cnProcBuf
,
int8_t
*
cnProcBufRes
);
#endif
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/main.c
deleted
100644 → 0
View file @
3ed622af
#include <stdio.h>
#include <immintrin.h>
//#include "../nrLDPCdecoder_defs.h"
#include "../nrLDPC_types.h"
#include "../nrLDPC_init.h"
//#include "../nrLDPC_mPass.h"
//#include "../nrLDPC_cnProc.h"
#include "../nrLDPC_bnProc.h"
#include "cnProc_gen.h"
int
main
(
int
argc
,
char
*
argv
[])
{
//short lift_size[51]= {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22,24,26,28,30,32,36,40,44,48,52,56,60,64,72,80,88,96,104,112,120,128,144,160,176,192,208,224,240,256,288,320,352,384};
// unsigned int errors, errors_bit, crc_misses;
// double errors_bit_uncoded;
//short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
// short No_iteration=5;
//int n_segments=1;
//double rate=0.333;
//int nom_rate=1;
//int denom_rate=3;
//double SNR0=-2.0,SNR,SNR_lin;
//unsigned char qbits=8;
// unsigned int decoded_errors[10000]; // initiate the size of matrix equivalent to size of SNR
//int c,i=0, i1 = 0;
// int n_trials = 1;
// double SNR_step = 0.1;
// randominit(0);
//int test_uncoded= 0;
//short BG=1,Zc,Kb;
// cpu_freq_GHz = get_cpu_freq_GHz();
//printf("the decoder supports BG2, Kb=10, Z=128 & 256\n");
//printf(" range of blocklength: 1201 -> 1280, 2401 -> 2560\n");
// printf("block length %d: \n", block_length);
//printf("n_trials %d: \n", n_trials);
// printf("SNR0 %f: \n", SNR0);
//find minimum value in all sets of lifting size
/* Zc=0;
for (i1=0; i1 < 51; i1++)
{
if (lift_size[i1] >= (double) block_length/Kb)
{
Zc = lift_size[i1];
//printf("%d\n",Zc);
break;
}
}*/
// Allocate LDPC decoder buffers
// p_nrLDPC_procBuf = nrLDPC_init_mem();
// load_nrLDPClib();
// load_nrLDPClib_ref("_orig", &encoder_orig);
// Z=384, R=1/3
nrLDPC_cnProc_BG1_generator
(
384
,
0
);
//nrLDPC_cnProc_BG1(&lut_numCnInCnGroups, &cnProcBuf, 380);
//for (block_length=8;block_length<=MAX_BLOCK_LENGTH;block_length+=8)
//determine number of bits in codeword
/*
char fname[200];
sprintf(fname,"cnProc_BG1_Zc_%d.c",384);
FILE *fd=fopen(fname,"w");
// AssertFatal(fd!=NULL,"cannot open %s\n",fname);
*/
//fclose(fd);
return
(
0
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment