Download pllava/lib/python3.10/site-packages/torch/_streambase.py from ZTWHHH/envs_2: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/datasets/ZTWHHH/envs_2/resolve/main/pllava/lib/python3.10/site-packages/torch/_streambase.py
- Command line
-
hf download hf://datasets/ZTWHHH/envs_2/pllava/lib/python3.10/site-packages/torch/_streambase.py
-
curl -L -o _streambase.py https://huggingface.co/datasets/ZTWHHH/envs_2/resolve/main/pllava/lib/python3.10/site-packages/torch/_streambase.py
1.11 kB
| # mypy: allow-untyped-defs | |
| from abc import ABC, abstractmethod | |
| class _StreamBase(ABC): | |
| r"""Base stream class abstraction for multi backends Stream to herit from""" | |
| def wait_event(self, event) -> None: | |
| raise NotImplementedError | |
| def wait_stream(self, stream) -> None: | |
| raise NotImplementedError | |
| def record_event(self, event=None) -> None: | |
| raise NotImplementedError | |
| def query(self) -> bool: | |
| raise NotImplementedError | |
| def synchronize(self) -> None: | |
| raise NotImplementedError | |
| def __eq__(self, stream) -> bool: | |
| raise NotImplementedError | |
| class _EventBase(ABC): | |
| r"""Base Event class abstraction for multi backends Event to herit from""" | |
| def wait(self, stream=None) -> None: | |
| raise NotImplementedError | |
| def query(self) -> bool: | |
| raise NotImplementedError | |
| def synchronize(self) -> None: | |
| raise NotImplementedError | |