Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tensor-Core Correlator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
Tensor-Core Correlator
Commits
1a1f5654
Commit
1a1f5654
authored
Oct 3, 2023
by
Bram Veenboer
Browse files
Options
Downloads
Patches
Plain Diff
Use target_embed_source to embed correlator kernel
parent
eae2636f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libtcc/CMakeLists.txt
+2
-4
2 additions, 4 deletions
libtcc/CMakeLists.txt
libtcc/Correlator.cc
+2
-11
2 additions, 11 deletions
libtcc/Correlator.cc
with
4 additions
and
15 deletions
libtcc/CMakeLists.txt
+
2
−
4
View file @
1a1f5654
...
...
@@ -10,6 +10,7 @@ target_include_directories(
$<BUILD_INTERFACE:
${
CMAKE_SOURCE_DIR
}
>
)
# Add links
target_link_libraries
(
tcc PRIVATE cudawrappers::cu cudawrappers::nvrtc
)
target_embed_source
(
tcc kernel/TCCorrelator.cu
)
# Install libraries and headers
install
(
TARGETS tcc
...
...
@@ -21,6 +22,3 @@ install(
EXPORT tcc-config
NAMESPACE
${
PROJECT_NAME
}
::
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
PROJECT_NAME
}
)
\ No newline at end of file
# Embed CUDA code
include
(
${
CMAKE_SOURCE_DIR
}
/cmake/Utils.cmake
)
include_cuda_code
(
tcc kernel/TCCorrelator.cu
)
This diff is collapsed.
Click to expand it.
libtcc/Correlator.cc
+
2
−
11
View file @
1a1f5654
...
...
@@ -7,7 +7,7 @@
#include
<link.h>
extern
const
char
_binary_
libtcc
_TCCorrelator_cu_start
,
_binary_
libtcc
_TCCorrelator_cu_end
;
extern
const
char
_binary_
kernel
_TCCorrelator_cu_start
,
_binary_
kernel
_TCCorrelator_cu_end
;
namespace
tcc
{
...
...
@@ -78,17 +78,8 @@ cu::Module Correlator::compileModule(unsigned nrBits,
//std::for_each(options.begin(), options.end(), [] (const std::string &e) { std::cout << e << ' '; }); std::cout << std::endl;
#if 0
nvrtc::Program program("tcc/TCCorrelator.cu");
#else
// embed the CUDA source code in libtcc.so, so that it need not be installed separately
// for runtime compilation
// copy into std::string for '\0' termination
const
std
::
string
source
=
#include
"TCCorrelator.cu"
;
const
std
::
string
source
(
_binary_kernel_TCCorrelator_cu_start
,
_binary_kernel_TCCorrelator_cu_end
);
nvrtc
::
Program
program
(
source
,
"TCCorrelator.cu"
);
#endif
try
{
program
.
compile
(
options
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment