Граф коммитов

191 Коммитов

Автор SHA1 Сообщение Дата
Denny Sun 3195e001c9
add array size as arguments (#70)
* add array size as arguments

* fix ctypes conversion
2022-09-15 02:18:25 -07:00
Lisa Ong d99d61d970
Initial verify_hat support for runtime arrays and elements (#65)
* support arbirtary pointer levels for declared types

* handle logical_type=element

* arg values

* refactor (func name, arg_info) to FunctionInfo

* fix circular imports

* .

* support dylib

* update verify_hat_package

* verify -> verify_args

* fixes

* fix verify_args

* formatting

* add verify hat test

* refactor

* handle ndarrays as arguments

* cleanup

* runtime_array verify test

* print output

* basic test passing

* Update test_create_simple_hat_file.py

* Update test_create_simple_hat_file.py

* comments

* comments

* TODOs

* nfc

* [test] moved creation to workdir

* rename

* Print output dimension references and clarify HAT schema (#66)

* infer shapes from size, add shape order requirement

* merged

* pretty print using cross references

Co-authored-by: Lisa Ong <onglisa@microsoft.com>

* revert formatting changes

* revert more formatting only changes

* simplify

* Add input and input/output runtime_array support (#67)

* wip

* scaffold

* scaffold and initial support for input elements and input/output runtime_arrays

* .

* fixups

* don't swallow exceptions

* support cargs for non pointer args

* cleanup

* refactor

* support integer-like types when checking constant shapes

* nfc

Co-authored-by: Lisa Ong <onglisa@microsoft.com>

* test coverage for  usage type Input and InputOutput

* [test] Support windows in verify_hat tests (#69)

* wip

* build for windows (#68)

Co-authored-by: Lisa Ong <onglisa@microsoft.com>

* windows tomlkit expects lists

* manual CI trigger

Co-authored-by: Lisa Ong <onglisa@microsoft.com>

* fix windows test

* fix logic and add comment

* .

* verify_args -> verify

* args -> arguments

* PR feedback

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-08-23 07:09:25 +08:00
Captain Jack Sparrow 65743f6e83
Merge pull request #64 from microsoft/dev/ritdas/robust_mean
Fix robust mean of means for batch_size < 2
2022-08-11 13:06:47 -07:00
Ritwik Das b79b697f0d Fix robust mean of means for batch_size < 2 2022-08-11 09:13:46 -07:00
Lisa Ong dbf5c7481b
switch to macos 12 for CI (#63)
Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-08-11 08:22:45 +08:00
Captain Jack Sparrow 5b930c2cb9
Merge pull request #61 from microsoft/dev/ritdas/batch1
Handle batch_size < 2 in mean of small means
2022-08-10 16:09:02 -07:00
Ritwik Das 426fbbc22a Handle batch_size < 2 in mean of small means 2022-08-10 15:42:12 -07:00
Lisa Ong fa6d727cf6
Add runtime output array sample and deserialization test (#60)
* removed duplicate test

* sample hat file for dynamic output arrays

* verify parsing of range sample

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-08-08 11:53:53 +08:00
Kern Handa 004632c406
Adds handling in ArgInfo to treat empty shape as scalar arrays (#59) 2022-08-03 11:28:17 -07:00
Mason Remy 4eb8fdc6c0
Merge pull request #58 from microsoft/review/masonremy/simpler_py_hat_authoring
Make it easier to author a hat file from python
2022-06-09 13:42:02 -07:00
Mason Remy 997e86a12f check for code string equivalence 2022-06-09 13:32:50 -07:00
Mason Remy 74589d19e4 PR feedback, test fixes 2022-06-09 13:23:56 -07:00
Mason Remy efa2e7063c Make it easier to author a hat file from python
- Instantiate more default objects for simple cases
- Enable modifying the list of functions in the hat file
- Make hat file functions and function_map wrap the same underlying
  object
2022-06-09 01:05:07 -07:00
Kern Handa aea0a8d3fc
Updates CUDA compilation to use device compute capability (#57) 2022-06-01 13:51:19 -07:00
Captain Jack Sparrow 476ecffaac
Merge pull request #56 from microsoft/dev/ritdas/bfloat16
Add bfloat16 support in hatlib
2022-05-26 22:27:27 -07:00
Ritwik Das 131945043d remove dependency from bfloat16 2022-05-26 20:06:24 -07:00
Ritwik Das 05a18c35ee wip 2022-05-26 19:53:46 -07:00
Ritwik Das 4fecc5e4ed add bfloat16 to setup.cfg 2022-05-26 19:47:52 -07:00
Ritwik Das 7d86c17344 Add bfloat16 support in hatlib 2022-05-26 19:19:14 -07:00
Captain Jack Sparrow 1cc05d70c4
Merge pull request #55 from microsoft/dev/ritdas/benchmark_expt
Make run_benchmark raise exceptions instead of swallowing it
2022-05-26 12:58:12 -07:00
Ritwik Das af7ced31d8 Make run_benchmark raise exceptions 2022-05-26 08:32:16 -07:00
Captain Jack Sparrow 8d9446b950
Merge pull request #54 from microsoft/dev/ritdas/hatlib_opts
Optimizations for CUDA benchmarking, log suppression
2022-05-19 00:38:42 -07:00
Ritwik Das e8212aefd5 Change default to False 2022-05-19 00:27:29 -07:00
Ritwik Das 49dff8c30b Add cuda benchmarking optimizations 2022-05-18 09:38:29 -07:00
Ritwik Das 928e6d3664 Add option to suppress logging 2022-05-18 00:25:35 -07:00
Captain Jack Sparrow 00cdfd9c22
Merge pull request #53 from microsoft/dev/ritdas/cuda_opts
Changes required to compile and run cuda kernels
2022-05-16 20:23:52 -07:00
Ritwik Das d1b7aaaa84 Address PR comments 2022-05-13 15:49:10 -07:00
Ritwik Das 4872459307 Some more cuda compiler changes 2022-05-13 15:12:07 -07:00
Ritwik Das 7ed9a2c615
Merge pull request #51 from microsoft/dev/ritdas/optimizations
Perf optimizations to hatlib when running benchmarks
2022-05-11 18:04:12 -07:00
Ritwik Das 6e523e3510 rename variable 2022-05-11 17:20:48 -07:00
Ritwik Das 52c1c4046f Merge branch 'main' into dev/ritdas/optimizations 2022-05-11 10:08:52 -07:00
Ritwik Das ddc0711527 Fix whitespace differences 2022-05-11 10:08:21 -07:00
Mason Remy 5349e07c12
Merge pull request #52 from microsoft/dev/masonr/fix_non_matrix_volume_computation
Fix array volume computation for arrays larger than 2-D
2022-05-10 18:46:10 -07:00
Mason Remy a23a2be45b Fix array volume computation for arrays larger than 2-D
We've been taking a product of strides and multiplying that by the major
dimension, but we should be just taking the largest stride and
multiplying that by the major dimension, as the largest stride
already factors in the other strides in the array shape.
2022-05-10 18:37:20 -07:00
Ritwik Das 87037b6b54 Merge branch 'main' into dev/ritdas/optimizations 2022-05-09 17:31:46 -07:00
Mason Remy 720e3f3395
Merge pull request #50 from microsoft/dev/masonr/fix_last_major_rocm_alloc
Fix byte size calculation to support layouts other than FIRST_MAJOR
2022-05-09 10:21:33 -07:00
Ritwik Das a663f94130 Some optimization to the hatlib when running benchmark 2022-05-06 22:09:39 -07:00
Mason Remy a50a524f57 Fix byte size calculation to support layouts other than FIRST_MAJOR 2022-05-06 13:00:18 -07:00
Lisa Ong b0da5dd9ed
Avoid printing null bytes in hiprtcGetProgramLog (#49)
* avoid printing null bytes in hiprtcGetProgramLog

* check value in the temp fix

* remove redudant log printing

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-05-06 12:20:18 +08:00
Lisa Ong 354df3dfcc
Don't print hiprtc log if compilation succeeds (#48)
* temporarily disable printing of hiprtc program log

* try longer term fix per https://github.com/ROCm-Developer-Tools/HIP/blob/develop/docs/markdown/hip_rtc.md?plain=1#L56

* check status before printing (log_size.value would be 1)

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-05-06 11:17:44 +08:00
Lisa Ong 228c83f783
Fix shadowed time variable in benchmark_hat_package.py (#47)
* nfc

* shadowed variable time in python 3.7

* invoke perf_counter

* nfc

* add more checks now that exceptions are swallowed

* more stringent checks for benchmark tests

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-04-21 06:36:16 +08:00
Kern Handa 397334322d
Makes CUDA and ROCm launchers more resilient (#46)
* Removes the usage of streams for kernel launches.
* Adds clean up code to make sure we free up any allocated memory in case of failures
* CUDA and ROCm versions of `CallableFunc` now reset device state better during runtime init
2022-04-14 22:34:26 -07:00
Kern Handa 5367112387
Adds support for verifying/benchmarking functions with layouts other than first major (#43)
* Adds support for function parameters with layouts other than first major
2022-04-14 22:15:08 -07:00
Kern Handa bce20498a3
Adds functions that failed to be benchmarked to the final CSV results (#44) 2022-04-14 22:02:01 -07:00
Kern Handa ce2fb0b133
Makes output from `hatlib.verify_hat` easier to read (#45) 2022-04-14 22:01:15 -07:00
Kern Handa 9cb567a1f6
Fixes time unit conversions in bechmark_hat (#42) 2022-04-12 15:29:20 -07:00
Kern Handa 4d561bcfba
Adds support for benchmarking CUDA and ROCm functions (#41) 2022-04-09 00:51:34 -07:00
Kern Handa a051e19a51 Fixes hatlib.verify_hat functionality (#40) 2022-04-02 20:06:53 -07:00
Lisa Ong e03bc274fa
Support unsigned int types in HAT file (#37)
* added unsigned int types

* updated readme

* PR feedback

* [nfc] order entries by size

* typo

* [nfc] restored comment
2022-03-31 15:48:19 +08:00
Kern Handa e9d674240e
Updates package config (#39)
* Prevents test folder from getting packaged

* Sets URL for package metadata
2022-03-30 19:09:44 -07:00