ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
64 stars 29 forks source link

PSRDADA block updates #194

Open telegraphic opened 1 year ago

telegraphic commented 1 year ago

These updates are from https://github.com/Molonglo/bifrost, which is used for UTMOST-2D.

An alternative to this merge is to move PSRDADA functionality into a plugin.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 9.96% and project coverage change: -2.76 :warning:

Comparison is base (e9c34da) 67.04% compared to head (78de6d4) 64.28%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #194 +/- ## ========================================== - Coverage 67.04% 64.28% -2.76% ========================================== Files 69 68 -1 Lines 7482 6096 -1386 ========================================== - Hits 5016 3919 -1097 + Misses 2466 2177 -289 ``` | [Impacted Files](https://app.codecov.io/gh/ledatelescope/bifrost/pull/194?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LEDA+Collaboration) | Coverage Δ | | |---|---|---| | [python/bifrost/blocks/dada\_file.py](https://app.codecov.io/gh/ledatelescope/bifrost/pull/194?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LEDA+Collaboration#diff-cHl0aG9uL2JpZnJvc3QvYmxvY2tzL2RhZGFfZmlsZS5weQ==) | `0.00% <0.00%> (ø)` | | | [python/bifrost/psrdada.py](https://app.codecov.io/gh/ledatelescope/bifrost/pull/194?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LEDA+Collaboration#diff-cHl0aG9uL2JpZnJvc3QvcHNyZGFkYS5weQ==) | `32.51% <16.00%> (+30.88%)` | :arrow_up: | | [python/bifrost/blocks/psrdada.py](https://app.codecov.io/gh/ledatelescope/bifrost/pull/194?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LEDA+Collaboration#diff-cHl0aG9uL2JpZnJvc3QvYmxvY2tzL3BzcmRhZGEucHk=) | `19.90% <17.29%> (+15.55%)` | :arrow_up: | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/ledatelescope/bifrost/pull/194/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LEDA+Collaboration)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

ledatelescope commented 1 year ago

Tensor core arithmetic also accelerates 16 bit type data.

On 2/14/23 9:49 AM, jaycedowell wrote:

In python/bifrost/blocks/psrdada.py https://github.com/ledatelescope/bifrost/pull/194#discussion_r1105904988:

  • Returns:
  • s (str): DADA header string with padding to hdrlen
  • """
  • s = "HDR_VERSION 1.0\n"
  • s+= "HDR_SIZE %i\n" % hdrlen
  • keys_to_skip = ('HDR_VERSION', 'HDR_SIZE')
  • update parameters from bifrost tensor

  • if '_tensor' in hdr_dict.keys():
  • print(hdr_dict['_tensor'])
  • dtype = hdr_dict['_tensor']['dtype']
  • dtype_vals = {
  • 'cf32': { 'NBIT': '32', 'NDIM': '2' },
  • 'f32': { 'NBIT': '32', 'NDIM': '1' },
  • 'ci8': { 'NBIT': '8', 'NDIM': '2' },
  • 'i8': { 'NBIT': '8', 'NDIM': '1' } }

Are additional data types expected/allowed?


ledatelescope commented 1 year ago

I raised the notion of 16-bit  to accommodate directly time-series output from many-bit ADCs.  i16 would do that.  Quick examination suggests that uint16 is recognized by CUDA7(?) but using it may not result in speed advantage over 4-byte integer math.  Proper research required.

On 2/15/23 1:58 AM, Danny Price wrote:

@.**** commented on this pull request.


In python/bifrost/blocks/psrdada.py https://github.com/ledatelescope/bifrost/pull/194#discussion_r1106722410:

  • Returns:
  • s (str): DADA header string with padding to hdrlen
  • """
  • s = "HDR_VERSION 1.0\n"
  • s+= "HDR_SIZE %i\n" % hdrlen
  • keys_to_skip = ('HDR_VERSION', 'HDR_SIZE')
  • update parameters from bifrost tensor

  • if '_tensor' in hdr_dict.keys():
  • print(hdr_dict['_tensor'])
  • dtype = hdr_dict['_tensor']['dtype']
  • dtype_vals = {
  • 'cf32': { 'NBIT': '32', 'NDIM': '2' },
  • 'f32': { 'NBIT': '32', 'NDIM': '1' },
  • 'ci8': { 'NBIT': '8', 'NDIM': '2' },
  • 'i8': { 'NBIT': '8', 'NDIM': '1' } }

There isn't really a strict definition AFAIK. There is no header keyword for float/integer, but I think it's reasonable to add cf64/f64. Would need to decide between i16/ci16 and f16/cf16 though

— Reply to this email directly, view it on GitHub https://github.com/ledatelescope/bifrost/pull/194#discussion_r1106722410, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACL54MQIQ7KCUU3K6EQ33PDWXR5CFANCNFSM6AAAAAAS7I5RJ4. You are receiving this because you commented.Message ID: @.***>