Skip to content

danielin917/sDTW-AMD

Repository files navigation

CSE P 590 Project : Accelerating sDTW on AMD GPUs

Daniel Lin, Sofia Isadora Padilla Munoz

How to run

The run bash script in the root directory is used for building the program and running several important tasks:

  • ./run build builds the sdtw binary, which is our main program.

  • ./run build && ./run test_batch #test-number runs the given test (identified by #test-number in [0, 1, 2, etc]) on the GPU using sbatch and compares it against the expected solution result.raw using wbSolution. Tests are found in src/test/#test-number and are comprised of the following files:

    • query.raw: a query or batch of queries; in the case of a batch of queries, a batchSize number of queries is expected to be listed contiguously; each query is assumed to be of the same size; the size of the queries is computed as (total-1)/batchSize.

      total number of lines in file minus 1 (total)
      batch size (batchSize)
      query 0 starts
      ..
      query 0 ends
      query 1 starts
      ..
      query 1 ends
      query batchSize-1 starts
      ..
      query batchSize-1 ends
      
    • reference.raw: the reference, one entry per line.

      number of entries (n)
      entry 0
      ..
      entry n-1
      
    • result.raw: expected sDTW output for each of the queries in the batch.

      batch size (batchSize)
      query 0 expected result
      ..
      query batchSize-1 expected result
      
    • attempt.raw: actual sDTW output produced by the HIP kernel.

      batch size (batchSize)
      query 1 actual result
      ..
      query batchSize-1 actual result
      
  • ./run build_normalizer && ./run normalize_throughput: builds a standalone normalizer executable and computes throughput in gigasamples per second and average execution time (ms); this is the result of running the normalizer 10 times on a 512x2000 batch; the query data is generated using the cbf_generator from https://github.com/asbschmidt/cuDTW.

    As of 3/6:
    AVG time: 0.0212798ms
    Gsps: 4.81208 
    

Example output log

The following is an example output log of ./run build && ./run test_batch 13, where 13 is our largest test data sample (512x2000 query batch and 100000 reference).

sDTW invoked normalizer on reference
normalizer started execution at (micros since epoch): 1710043177336405
normalizer copied host batch to device
normalize KERNEL started execution at (micros since epoch): 1710043177546167
normalize KERNEL finished execution at (micros since epoch): 1710043177547029
normalize KERNEL execution time was 0.804801ms (0.000804801s)
normalize KERNEL throughput was 0.124254 gigasamples per second
normalizer finished execution at (micros since epoch): 1710043177547435

sDTW resumed after reference was normalized

sDTW invoked normalizer on 512x2000 query batch
normalizer started execution at (micros since epoch): 1710043178943163
normalizer copied host batch to device
normalize KERNEL started execution at (micros since epoch): 1710043178943401
normalize KERNEL finished execution at (micros since epoch): 1710043178943572
normalize KERNEL execution time was 0.05504ms (5.504e-05s)
normalize KERNEL throughput was 18.6047 gigasamples per second
normalizer finished execution at (micros since epoch): 1710043178943752

sDTW resumed after query batch was normalized

sDTW started execution at (micros since epoch): 1710043178947694
sDTW KERNEL started execution at (micros since epoch): 1710043178947910
sDTW KERNEL throughput was 0.000697842 gigasamples per second
sDTW KERNEL finished execution at (micros since epoch): 1710043196554091
sDTW KERNEL execution time was 14673.8ms (14.6738s)
sDTW finished execution at (micros since epoch): 1710043196554749

How were tests generated

As explained above, ./run test_batch #test-number runs against a few tests files. These files were generated using the Python script found in scripts/generate_test.py.

python3 scripts/generate_test.py src/test/{test-number} {query size} {reference size} {batch} {run sDTW, true/false}

The queries were generated using make_cylinder_bell_funnel from pyts.datasets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published