Skip to content
GitLab
Explore
Sign in
Register
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
b283c750
Commit
b283c750
authored
Dec 15, 2021
by
John Romein
Browse files
Options
Downloads
Patches
Plain Diff
Added support for custom visibility format (undocumented).
parent
b34a5269
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
libtcc/Correlator.cc
+8
-3
8 additions, 3 deletions
libtcc/Correlator.cc
libtcc/Correlator.h
+6
-2
6 additions, 2 deletions
libtcc/Correlator.h
libtcc/TCCorrelator.cu
+26
-7
26 additions, 7 deletions
libtcc/TCCorrelator.cu
with
40 additions
and
12 deletions
libtcc/Correlator.cc
+
8
−
3
View file @
b283c750
...
@@ -35,10 +35,11 @@ Correlator::Correlator(unsigned nrBits,
...
@@ -35,10 +35,11 @@ Correlator::Correlator(unsigned nrBits,
unsigned
nrChannels
,
unsigned
nrChannels
,
unsigned
nrSamplesPerChannel
,
unsigned
nrSamplesPerChannel
,
unsigned
nrPolarizations
,
unsigned
nrPolarizations
,
unsigned
nrReceiversPerBlock
unsigned
nrReceiversPerBlock
,
const
std
::
string
&
customStoreVisibility
)
)
:
:
correlatorModule
(
compileModule
(
nrBits
,
nrReceivers
,
nrChannels
,
nrSamplesPerChannel
,
nrPolarizations
,
nrReceiversPerBlock
)),
correlatorModule
(
compileModule
(
nrBits
,
nrReceivers
,
nrChannels
,
nrSamplesPerChannel
,
nrPolarizations
,
nrReceiversPerBlock
,
customStoreVisibility
)),
correlatorKernel
(
correlatorModule
,
nrBits
,
nrReceivers
,
nrChannels
,
nrSamplesPerChannel
,
nrPolarizations
,
nrReceiversPerBlock
)
correlatorKernel
(
correlatorModule
,
nrBits
,
nrReceivers
,
nrChannels
,
nrSamplesPerChannel
,
nrPolarizations
,
nrReceiversPerBlock
)
{
{
}
}
...
@@ -49,7 +50,8 @@ cu::Module Correlator::compileModule(unsigned nrBits,
...
@@ -49,7 +50,8 @@ cu::Module Correlator::compileModule(unsigned nrBits,
unsigned
nrChannels
,
unsigned
nrChannels
,
unsigned
nrSamplesPerChannel
,
unsigned
nrSamplesPerChannel
,
unsigned
nrPolarizations
,
unsigned
nrPolarizations
,
unsigned
nrReceiversPerBlock
unsigned
nrReceiversPerBlock
,
const
std
::
string
&
customStoreVisibility
)
)
{
{
cu
::
Device
device
(
cu
::
Context
::
getCurrent
().
getDevice
());
cu
::
Device
device
(
cu
::
Context
::
getCurrent
().
getDevice
());
...
@@ -69,6 +71,9 @@ cu::Module Correlator::compileModule(unsigned nrBits,
...
@@ -69,6 +71,9 @@ cu::Module Correlator::compileModule(unsigned nrBits,
"-DNR_RECEIVERS_PER_BLOCK="
+
std
::
to_string
(
nrReceiversPerBlock
),
"-DNR_RECEIVERS_PER_BLOCK="
+
std
::
to_string
(
nrReceiversPerBlock
),
};
};
if
(
!
customStoreVisibility
.
empty
())
options
.
push_back
(
"-DCUSTOM_STORE_VISIBILITY="
+
customStoreVisibility
);
//std::for_each(options.begin(), options.end(), [] (const std::string &e) { std::cout << e << ' '; }); std::cout << std::endl;
//std::for_each(options.begin(), options.end(), [] (const std::string &e) { std::cout << e << ' '; }); std::cout << std::endl;
#if 0
#if 0
...
...
This diff is collapsed.
Click to expand it.
libtcc/Correlator.h
+
6
−
2
View file @
b283c750
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#include
"util/cu.h"
#include
"util/cu.h"
#include
"util/nvrtc.h"
#include
"util/nvrtc.h"
#include
<string>
namespace
tcc
{
namespace
tcc
{
class
Correlator
{
class
Correlator
{
...
@@ -14,7 +16,8 @@ namespace tcc {
...
@@ -14,7 +16,8 @@ namespace tcc {
unsigned
nrChannels
,
unsigned
nrChannels
,
unsigned
nrSamplesPerChannel
,
unsigned
nrSamplesPerChannel
,
unsigned
nrPolarizations
=
2
,
unsigned
nrPolarizations
=
2
,
unsigned
nrReceiversPerBlock
=
64
unsigned
nrReceiversPerBlock
=
64
,
const
std
::
string
&
customStoreVisibility
=
""
);
// throw (cu::Error, nvrtc::Error)
);
// throw (cu::Error, nvrtc::Error)
void
launchAsync
(
cu
::
Stream
&
,
cu
::
DeviceMemory
&
visibilities
,
cu
::
DeviceMemory
&
samples
);
// throw (cu::Error)
void
launchAsync
(
cu
::
Stream
&
,
cu
::
DeviceMemory
&
visibilities
,
cu
::
DeviceMemory
&
samples
);
// throw (cu::Error)
...
@@ -29,7 +32,8 @@ namespace tcc {
...
@@ -29,7 +32,8 @@ namespace tcc {
unsigned
nrChannels
,
unsigned
nrChannels
,
unsigned
nrSamplesPerChannel
,
unsigned
nrSamplesPerChannel
,
unsigned
nrPolarizations
,
unsigned
nrPolarizations
,
unsigned
nrReceiversPerBlock
unsigned
nrReceiversPerBlock
,
const
std
::
string
&
customStoreVisibility
);
);
cu
::
Module
correlatorModule
;
cu
::
Module
correlatorModule
;
...
...
This diff is collapsed.
Click to expand it.
libtcc/TCCorrelator.cu
+
26
−
7
View file @
b283c750
...
@@ -39,14 +39,21 @@
...
@@ -39,14 +39,21 @@
using
namespace
nvcuda
::
wmma
;
using
namespace
nvcuda
::
wmma
;
#if NR_BITS == 4
#if NR_BITS == 4
typedef
char
Sample
s
[
NR_CHANNELS
][
NR_SAMPLES_PER_CHANNEL
/
NR_TIMES_PER_BLOCK
][
NR_RECEIVERS
][
NR_POLARIZATIONS
][
NR_TIMES_PER_BLOCK
]
;
typedef
char
Sample
;
typedef
int2
Visibilit
ies
[
NR_CHANNELS
][
NR_BASELINES
][
NR_POLARIZATIONS
][
NR_POLARIZATIONS
]
;
typedef
int2
Visibilit
y
;
#elif NR_BITS == 8
#elif NR_BITS == 8
typedef
char2
Sample
s
[
NR_CHANNELS
][
NR_SAMPLES_PER_CHANNEL
/
NR_TIMES_PER_BLOCK
][
NR_RECEIVERS
][
NR_POLARIZATIONS
][
NR_TIMES_PER_BLOCK
]
;
typedef
char2
Sample
;
typedef
int2
Visibilit
ies
[
NR_CHANNELS
][
NR_BASELINES
][
NR_POLARIZATIONS
][
NR_POLARIZATIONS
]
;
typedef
int2
Visibilit
y
;
#elif NR_BITS == 16
#elif NR_BITS == 16
typedef
__half2
Samples
[
NR_CHANNELS
][
NR_SAMPLES_PER_CHANNEL
/
NR_TIMES_PER_BLOCK
][
NR_RECEIVERS
][
NR_POLARIZATIONS
][
NR_TIMES_PER_BLOCK
];
typedef
__half2
Sample
;
typedef
float2
Visibilities
[
NR_CHANNELS
][
NR_BASELINES
][
NR_POLARIZATIONS
][
NR_POLARIZATIONS
];
typedef
float2
Visibility
;
#endif
typedef
Sample
Samples
[
NR_CHANNELS
][
NR_SAMPLES_PER_CHANNEL
/
NR_TIMES_PER_BLOCK
][
NR_RECEIVERS
][
NR_POLARIZATIONS
][
NR_TIMES_PER_BLOCK
];
#if !defined CUSTOM_STORE_VISIBILITY
typedef
Visibility
Visibilities
[
NR_CHANNELS
][
NR_BASELINES
][
NR_POLARIZATIONS
][
NR_POLARIZATIONS
];
#endif
#endif
...
@@ -194,10 +201,22 @@ __device__ inline float2 make_complex(float real, float imag)
...
@@ -194,10 +201,22 @@ __device__ inline float2 make_complex(float real, float imag)
}
}
#if defined CUSTOM_STORE_VISIBILITY
CUSTOM_STORE_VISIBILITY
#else
template
<
typename
T
>
__device__
inline
void
storeVisibility
(
Visibilities
visibilities
,
unsigned
channel
,
unsigned
baseline
,
unsigned
polY
,
unsigned
polX
,
T
visibility
)
{
visibilities
[
channel
][
baseline
][
polY
][
polX
]
=
visibility
;
}
#endif
template
<
typename
T
>
__device__
inline
void
storeVisibility
(
Visibilities
visibilities
,
unsigned
channel
,
unsigned
baseline
,
unsigned
recvY
,
unsigned
recvX
,
unsigned
tcY
,
unsigned
tcX
,
unsigned
polY
,
unsigned
polX
,
bool
skipCheckY
,
bool
skipCheckX
,
T
sumR
,
T
sumI
)
template
<
typename
T
>
__device__
inline
void
storeVisibility
(
Visibilities
visibilities
,
unsigned
channel
,
unsigned
baseline
,
unsigned
recvY
,
unsigned
recvX
,
unsigned
tcY
,
unsigned
tcX
,
unsigned
polY
,
unsigned
polX
,
bool
skipCheckY
,
bool
skipCheckX
,
T
sumR
,
T
sumI
)
{
{
if
((
skipCheckX
||
recvX
+
tcX
<=
recvY
+
tcY
)
&&
(
skipCheckY
||
recvY
+
tcY
<
NR_RECEIVERS
))
if
((
skipCheckX
||
recvX
+
tcX
<=
recvY
+
tcY
)
&&
(
skipCheckY
||
recvY
+
tcY
<
NR_RECEIVERS
))
visibilities
[
channel
][
baseline
+
tcY
*
recvY
+
tcY
*
(
tcY
+
1
)
/
2
+
tcX
][
polY
][
polX
]
=
make_complex
(
sumR
,
sumI
);
storeVisibility
(
visibilities
,
channel
,
baseline
+
tcY
*
recvY
+
tcY
*
(
tcY
+
1
)
/
2
+
tcX
,
polY
,
polX
,
make_complex
(
sumR
,
sumI
)
)
;
}
}
...
...
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