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

14 Коммитов

Автор SHA1 Сообщение Дата
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
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
Kern Handa 544fcc0e01
Refactors and restructures code for tighter integration of HAT object model (#36)
Changes:
* utility functions in `hatlib` now make use of the HAT object model (OM). Previously, `tomlkit` was being using directly and was bypassing the checks and OM construction of child objects.
* `hatlib.load` now returns a `HATPackage` object that results from deserializing the HAT file passed in. Additionally, if functions can be loaded, a non-empty `AttributeDict` is returned as a second value.
* Moved test folder to be a sibling of library folder. Now the package no longer contains the tests when installed. Additionally, the library can be tested by running `python -m unittest discover test` in the root of the repository.
* Adds YAPF style config to setup.cfg and formatted all touched files with `yapf`
2022-03-30 13:50:00 -07:00
Lisa Ong 213536dd77
Fix path 2022-03-15 15:51:04 +08:00
Lisa Ong d22fe3bc42
Publish to PyPI on tags (#31)
* Publish to PyPI on tags

* add extra guardrails

* nfc

* nfc

* moved pip install to install phase

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-03-15 15:40:48 +08:00
Kern Handa 615006cecb
Add beginnings of support for CUDA device functions (#32)
Adds support for GPU, device functions, and launch functions
2022-03-14 23:20:41 -07:00
Lisa Ong c5f47334e0
Support python 3.10 (#26)
* support python 3.10

* remove invalid import

* Revert "remove invalid import" (wrong branch)

This reverts commit 792ee449b1.

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-01-28 11:39:41 +08:00
Lisa Ong 8eca7c8735
Fix regression in accessing target_file (#20)
* fix regression in accessing target_file

* sanitize name for macro definitions

* always create a unique dll

* tweak to filename

* keep dependencies

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-01-25 07:01:47 +08:00
Lisa Ong 95a327ee1c
Resolve Debug mode functions for the dynamic HAT package (#15)
* scaffold

* snap to 1.2.1.dev releases

* generate different test packages for each mode

* resolve debug mode functions

* update test instructions

* [pendantic] use gcc instead of g++

* resolve inline functions in windows

* suppress gcc warnings about missing terminating ' character

* removed comments until we determine layering

* confirm uninstall in CI workflow

* PR feedback

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-01-19 10:00:43 +08:00
Lisa Ong 9146a032b1
Add macOS to CI pipeline, restore HATPackage to accept a file path instead of a directory path (#13)
* restored hat package definition as a hat file + library

* [nfc] pydoc update

* update test condition

* replace test data files with runtime generation

* install test dependencies

* update whl test

* fix folder name

* export run_benchmark, support spaces in strings

* fixed add_functions to expect a single hat file

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-01-13 08:31:26 +08:00
Lisa Ong d2b3132a24
Just-in-time prompts to locate and configure Visual Studio paths (#12)
* add vswhere to setup requirements for win32

* Prompt the user to run vcvars64.bat if cl is not in path

* Check for return value of os.system

* CI: disable flaky tests

* add skip reason

* disable more flaky ubuntu tests

Co-authored-by: Lisa Ong <onglisa@microsoft.com>
2022-01-12 11:59:50 +08:00
Lisa Ong c02249ab42 Try powershell to locate the whl 2022-01-12 09:50:14 +08:00
Lisa Ong fce73a5604 Add developer command prompt and fix test command 2022-01-12 09:05:47 +08:00
Lisa Ong 57ea2ed980
Add continuous integration 2022-01-12 08:49:27 +08:00