Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock-fpga
Commits
2d758e37
Commit
2d758e37
authored
Oct 30, 2018
by
Leonardo Solis
Browse files
#28, replaced krnl refs: from k2 to krnl_conform
parent
ec2160ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
common_xilinx/utility/boards.mk
View file @
2d758e37
...
...
@@ -20,8 +20,8 @@ CXXFLAGS:=-Wall -O0 -g -std=c++14 $(OTHER_FLAGS)
# =============================
# Enable Kernels
# =============================
ENABLE_KRNL_GA
=
YES
ENABLE_K
2
=
YES
ENABLE_KRNL_GA
=
YES
ENABLE_K
RNL_CONFORM
=
YES
ENABLE_K3
=
YES
ENABLE_K4
=
YES
...
...
@@ -82,10 +82,10 @@ else
KRNL_GA
=
endif
ifeq
($(ENABLE_K
2
),YES)
K
2
=
-DENABLE_K
E
RN
EL2
ifeq
($(ENABLE_K
RNL_CONFORM
),YES)
K
RNL_CONFORM
=
-DENABLE_KRN
L_CONFORM
else
K
2
=
K
RNL_CONFORM
=
endif
ifeq
($(ENABLE_K3),YES)
...
...
@@ -247,7 +247,9 @@ ifeq ($(REPRO), YES)
else
REP
=
endif
ENABLE_KERNELS
=
$(KRNL_GA)
$(K2)
$(K3)
$(K4)
$(K6)
$(K7)
$(K10)
\
ENABLE_KERNELS
=
$(KRNL_GA)
\
$(KRNL_CONFORM)
\
$(K3)
$(K4)
$(K6)
$(K7)
$(K10)
\
$(K12)
$(K14)
$(K15)
$(K20)
\
$(K21)
$(K27)
\
$(K35)
$(K36)
$(K37)
$(K38)
$(K39)
$(K40)
\
...
...
ofdock_taskpar_xl/host/src/performdocking.cpp
View file @
2d758e37
...
...
@@ -40,17 +40,17 @@ static cl_context context = NULL;
static cl_command_queue command_queue = NULL;
#endif
// Kernel name
,
as defined in the CL file
// Kernel name as defined in the CL file
#ifdef ENABLE_KRNL_GA
static
cl_command_queue
command_queue_ga
=
NULL
;
static
cl_kernel
kernel_ga
=
NULL
;
static
const
char
*
name_krnl_ga
=
"Krnl_GA"
;
#endif
#ifdef ENABLE_K
E
RN
EL2
static
cl_command_queue
command_queue
2
=
NULL
;
static
cl_kernel
kernel
2
=
NULL
;
static
const
char
*
name_k
2
=
"Krnl_Conform"
;
#ifdef ENABLE_KRN
L_CONFORM
static
cl_command_queue
command_queue
_conform
=
NULL
;
static
cl_kernel
kernel
_conform
=
NULL
;
static
const
char
*
name_k
rnl_conform
=
"Krnl_Conform"
;
#endif
#ifdef ENABLE_KERNEL3
...
...
@@ -879,37 +879,37 @@ printf("%i %i\n", dockpars.num_of_intraE_contributors, myligand_reference.num_of
#endif
#endif // End of ENABLE_KRNL_GA
#ifdef ENABLE_K
E
RN
EL2
// Krnl_Conform
setKernelArg
(
kernel
2
,
0
,
sizeof
(
mem_KerConstStatic_rotlist_const
),
&
mem_KerConstStatic_rotlist_const
);
setKernelArg
(
kernel
2
,
1
,
sizeof
(
mem_KerConstStatic_ref_coords_const
),
&
mem_KerConstStatic_ref_coords_const
);
setKernelArg
(
kernel
2
,
2
,
sizeof
(
mem_KerConstStatic_rotbonds_moving_vectors_const
),
&
mem_KerConstStatic_rotbonds_moving_vectors_const
);
setKernelArg
(
kernel
2
,
3
,
sizeof
(
mem_KerConstStatic_rotbonds_unit_vectors_const
),
&
mem_KerConstStatic_rotbonds_unit_vectors_const
);
setKernelArg
(
kernel
2
,
4
,
sizeof
(
unsigned
int
),
&
dockpars
.
rotbondlist_length
);
setKernelArg
(
kernel
2
,
5
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atoms
);
setKernelArg
(
kernel
2
,
6
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_genes
);
#ifdef ENABLE_KRN
L_CONFORM
// Krnl_Conform
setKernelArg
(
kernel
_conform
,
0
,
sizeof
(
mem_KerConstStatic_rotlist_const
),
&
mem_KerConstStatic_rotlist_const
);
setKernelArg
(
kernel
_conform
,
1
,
sizeof
(
mem_KerConstStatic_ref_coords_const
),
&
mem_KerConstStatic_ref_coords_const
);
setKernelArg
(
kernel
_conform
,
2
,
sizeof
(
mem_KerConstStatic_rotbonds_moving_vectors_const
),
&
mem_KerConstStatic_rotbonds_moving_vectors_const
);
setKernelArg
(
kernel
_conform
,
3
,
sizeof
(
mem_KerConstStatic_rotbonds_unit_vectors_const
),
&
mem_KerConstStatic_rotbonds_unit_vectors_const
);
setKernelArg
(
kernel
_conform
,
4
,
sizeof
(
unsigned
int
),
&
dockpars
.
rotbondlist_length
);
setKernelArg
(
kernel
_conform
,
5
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atoms
);
setKernelArg
(
kernel
_conform
,
6
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_genes
);
/*
setKernelArg(kernel
2
,7, sizeof(unsigned char), &num_rotbonds);
setKernelArg(kernel
2
,8, sizeof(mem_KerConstStatic_ref_orientation_quats_const), &mem_KerConstStatic_ref_orientation_quats_const);
setKernelArg(kernel
_conform
,7, sizeof(unsigned char), &num_rotbonds);
setKernelArg(kernel
_conform
,8, sizeof(mem_KerConstStatic_ref_orientation_quats_const), &mem_KerConstStatic_ref_orientation_quats_const);
*/
setKernelArg
(
kernel
2
,
7
,
sizeof
(
mem_KerConstStatic_ref_orientation_quats_const
),
&
mem_KerConstStatic_ref_orientation_quats_const
);
setKernelArg
(
kernel
_conform
,
7
,
sizeof
(
mem_KerConstStatic_ref_orientation_quats_const
),
&
mem_KerConstStatic_ref_orientation_quats_const
);
#if defined(SINGLE_COPY_POP_ENE)
#else
#if defined (FIXED_POINT_CONFORM)
// fixed-point
setKernelArg
(
kernel
2
,
8
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
0
]);
setKernelArg
(
kernel
2
,
9
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
1
]);
setKernelArg
(
kernel
2
,
10
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
2
]);
setKernelArg
(
kernel
2
,
11
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
3
]);
setKernelArg
(
kernel
_conform
,
8
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
0
]);
setKernelArg
(
kernel
_conform
,
9
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
1
]);
setKernelArg
(
kernel
_conform
,
10
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
2
]);
setKernelArg
(
kernel
_conform
,
11
,
sizeof
(
fixedpt
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
3
]);
#else
// floating-point (original)
setKernelArg
(
kernel
2
,
8
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
0
]);
setKernelArg
(
kernel
2
,
9
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
1
]);
setKernelArg
(
kernel
2
,
10
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
2
]);
setKernelArg
(
kernel
2
,
11
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
3
]);
setKernelArg
(
kernel
_conform
,
8
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
0
]);
setKernelArg
(
kernel
_conform
,
9
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
1
]);
setKernelArg
(
kernel
_conform
,
10
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
2
]);
setKernelArg
(
kernel
_conform
,
11
,
sizeof
(
float
),
&
KerConstDynamic
.
ref_orientation_quats_const
[
3
]);
#endif
#endif
#endif // End of ENABLE_K
E
RN
EL2
#endif // End of ENABLE_KRN
L_CONFORM
unsigned
char
gridsizex_minus1
=
dockpars
.
gridsize_x
-
1
;
...
...
@@ -1367,39 +1367,39 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
#endif
#endif
#ifdef ENABLE_K
E
RN
EL2
// Krnl_Conform
#ifdef ENABLE_KRN
L_CONFORM
// Krnl_Conform
/*
#if defined(SINGLE_COPY_POP_ENE)
#if defined (FIXED_POINT_CONFORM)
setKernelArg(kernel
2
,8, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt]);
setKernelArg(kernel
2
,9, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 1]);
setKernelArg(kernel
2
,10, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 2]);
setKernelArg(kernel
2
,11, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 3]);
setKernelArg(kernel
_conform
,8, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt]);
setKernelArg(kernel
_conform
,9, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 1]);
setKernelArg(kernel
_conform
,10, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 2]);
setKernelArg(kernel
_conform
,11, sizeof(fixedpt), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 3]);
#else
setKernelArg(kernel
2
,8, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt]);
setKernelArg(kernel
2
,9, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 1]);
setKernelArg(kernel
2
,10, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 2]);
setKernelArg(kernel
2
,11, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 3]);
setKernelArg(kernel
_conform
,8, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt]);
setKernelArg(kernel
_conform
,9, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 1]);
setKernelArg(kernel
_conform
,10, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 2]);
setKernelArg(kernel
_conform
,11, sizeof(float), &KerConstStatic.ref_orientation_quats_const[4*run_cnt + 3]);
#endif
#else
#if defined (FIXED_POINT_CONFORM)
setKernelArg(kernel
2
,8, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[0]);
setKernelArg(kernel
2
,9, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[1]);
setKernelArg(kernel
2
,10, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[2]);
setKernelArg(kernel
2
,11, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[3]);
setKernelArg(kernel
_conform
,8, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[0]);
setKernelArg(kernel
_conform
,9, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[1]);
setKernelArg(kernel
_conform
,10, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[2]);
setKernelArg(kernel
_conform
,11, sizeof(fixedpt), &KerConstDynamic.ref_orientation_quats_const[3]);
#else
setKernelArg(kernel
2
,8, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[0]);
setKernelArg(kernel
2
,9, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[1]);
setKernelArg(kernel
2
,10, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[2]);
setKernelArg(kernel
2
,11, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[3]);
setKernelArg(kernel
_conform
,8, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[0]);
setKernelArg(kernel
_conform
,9, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[1]);
setKernelArg(kernel
_conform
,10, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[2]);
setKernelArg(kernel
_conform
,11, sizeof(float), &KerConstDynamic.ref_orientation_quats_const[3]);
#endif
#endif
*/
/*
setKernelArg(kernel
2
,9, sizeof(unsigned short), &run_cnt);
setKernelArg(kernel
_conform
,9, sizeof(unsigned short), &run_cnt);
*/
setKernelArg
(
kernel
2
,
8
,
sizeof
(
unsigned
short
),
&
run_cnt
);
#endif // End of ENABLE_K
E
RN
EL2
setKernelArg
(
kernel
_conform
,
8
,
sizeof
(
unsigned
short
),
&
run_cnt
);
#endif // End of ENABLE_KRN
L_CONFORM
#ifdef ENABLE_KERNEL6 // Krnl_PRNG_GG_float
setKernelArg
(
kernel6
,
0
,
sizeof
(
unsigned
int
),
&
cpu_prng_seeds
[
num_of_prng_blocks
*
run_cnt
]);
...
...
@@ -1470,9 +1470,9 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
runKernelTask
(
command_queue_ga
,
kernel_ga
,
NULL
,
NULL
);
#endif // ENABLE_KRNL_GA
#ifdef ENABLE_K
E
RN
EL2
runKernelTask
(
command_queue
2
,
kernel2
,
NULL
,
NULL
);
#endif // ENABLE_K
E
RN
EL2
#ifdef ENABLE_KRN
L_CONFORM
runKernelTask
(
command_queue
_conform
,
kernel_conform
,
NULL
,
NULL
);
#endif // ENABLE_KRN
L_CONFORM
#ifdef ENABLE_KERNEL3
runKernelTask
(
command_queue3
,
kernel3
,
NULL
,
NULL
);
...
...
@@ -1583,8 +1583,8 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
clFinish
(
command_queue_ga
);
#endif
#ifdef ENABLE_K
E
RN
EL2
clFinish
(
command_queue
2
);
#ifdef ENABLE_KRN
L_CONFORM
clFinish
(
command_queue
_conform
);
#endif
#ifdef ENABLE_KERNEL3
...
...
@@ -1970,16 +1970,16 @@ bool init() {
// original CL file, that was compiled into an XCLBIN file using the SDAccel tool
#ifdef ENABLE_KRNL_GA
command_queue_ga
=
clCreateCommandQueue
(
context
,
device
,
0
,
&
status
);
checkError
(
status
,
"Failed to create command queue
1
"
);
checkError
(
status
,
"Failed to create command queue
ga
"
);
kernel_ga
=
clCreateKernel
(
program
,
name_krnl_ga
,
&
status
);
checkError
(
status
,
"Failed to create kernel"
);
checkError
(
status
,
"Failed to create kernel
ga
"
);
#endif
#ifdef ENABLE_K
E
RN
EL2
command_queue
2
=
clCreateCommandQueue
(
context
,
device
,
0
,
&
status
);
checkError
(
status
,
"Failed to create command queue
2
"
);
kernel
2
=
clCreateKernel
(
program
,
name_k
2
,
&
status
);
checkError
(
status
,
"Failed to create kernel"
);
#ifdef ENABLE_KRN
L_CONFORM
command_queue
_conform
=
clCreateCommandQueue
(
context
,
device
,
0
,
&
status
);
checkError
(
status
,
"Failed to create command queue
conform
"
);
kernel
_conform
=
clCreateKernel
(
program
,
name_k
rnl_conform
,
&
status
);
checkError
(
status
,
"Failed to create kernel
conform
"
);
#endif
#ifdef ENABLE_KERNEL3
...
...
@@ -2167,9 +2167,9 @@ void cleanup() {
if
(
command_queue_ga
)
{
clReleaseCommandQueue
(
command_queue_ga
);}
#endif
#ifdef ENABLE_K
E
RN
EL2
if
(
kernel
2
)
{
clReleaseKernel
(
kernel
2
);}
if
(
command_queue
2
)
{
clReleaseCommandQueue
(
command_queue
2
);}
#ifdef ENABLE_KRN
L_CONFORM
if
(
kernel
_conform
)
{
clReleaseKernel
(
kernel
_conform
);}
if
(
command_queue
_conform
)
{
clReleaseCommandQueue
(
command_queue
_conform
);}
#endif
#ifdef ENABLE_KERNEL3
...
...
Leonardo Solis
@solis
mentioned in commit
1c452bc6
·
Jan 04, 2021
mentioned in commit
1c452bc6
mentioned in commit 1c452bc63b350700e662f8d409de68d6b54b98fb
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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