forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support unrolling of all static control flow (apache#10)
Dynamic control flow is working in progress.
- Loading branch information
Showing
33 changed files
with
1,972 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ jobs: | |
spack load [email protected]%gcc@=11.3.0 | ||
source ~/venv/frontend-env/bin/activate | ||
pip install --upgrade -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html | ||
LD_PRELOAD=~/frontend/ldlong.v3.9.12.so pytest -vs test | ||
srun --exclusive ./scripts/pytest_with_preload.sh -vs test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from typing import Any | ||
|
||
|
||
class Dynamic: | ||
pass | ||
|
||
|
||
class ScalarWithUnknownValue(Dynamic): | ||
pass | ||
|
||
|
||
dynamics = {} | ||
dynamic_refs = {} | ||
|
||
|
||
def mark_dynamic(obj: Any, dyn: Dynamic) -> None: | ||
idx = id(obj) | ||
dynamics[idx] = dyn | ||
dynamic_refs[idx] = obj | ||
|
||
|
||
def contains(obj: Any) -> bool: | ||
idx = id(obj) | ||
return idx in dynamics | ||
|
||
|
||
def contains_by_id(idx: int) -> bool: | ||
return idx in dynamics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.