FlashRWKV2 0.2.0a3__tar.gz → 0.2.0a4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/PKG-INFO +1 -1
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/PKG-INFO +1 -1
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/__init__.py +1 -1
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/pyproject.toml +1 -1
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/setup.py +20 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/SOURCES.txt +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/dependency_links.txt +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/not-zip-safe +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/requires.txt +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/FlashRWKV2.egg-info/top_level.txt +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/LICENSE +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/LICENSES/Apache-2.0.txt +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/MANIFEST.in +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/NOTICE +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/README.md +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/bindings.cpp +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/bindings.h +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/registration.cpp +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/sm80/sampling/infer_fp32_forward_varlen.cpp +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/sm80/sampling/infer_fp32_forward_varlen.cu +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/validation/recurrent_metadata.cpp +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/validation/recurrent_metadata.cu +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/validation.cpp +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/csrc/validation.h +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/_internal/elementwise.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/_internal/execution.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/_internal/linear.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/_internal/logprob.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/_internal/state.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/cmix/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/compile.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/embedding/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/head/ce/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/head/ce/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/head/l2wrap_ce/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/head/linear/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/loss/l2wrap_ce/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/loss/l2wrap_ce/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/mtp/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/post_norm/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/post_norm/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/sampling/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/kk_pre/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/readout/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/readout/pretrain.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/readout/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/tokenshift/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/tokenshift/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/vres_gate/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/wkv7/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/wkv7/pretrain.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/wkv7/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/wkv_prepare/__init__.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/flashrwkv2/tmix/wkv_prepare/tilelang.py +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/setup.cfg +0 -0
- {flashrwkv2-0.2.0a3 → flashrwkv2-0.2.0a4}/tests/test_runtime.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
|
+
import ast
|
|
3
4
|
import shutil
|
|
4
5
|
from pathlib import Path
|
|
5
6
|
|
|
@@ -10,6 +11,23 @@ from setuptools.command.sdist import sdist
|
|
|
10
11
|
ROOT = Path(__file__).resolve().parent
|
|
11
12
|
|
|
12
13
|
|
|
14
|
+
def _check_runtime_version(distribution_version: str) -> None:
|
|
15
|
+
init = ROOT / "flashrwkv2" / "__init__.py"
|
|
16
|
+
module = ast.parse(init.read_text(encoding="utf-8"), filename=str(init))
|
|
17
|
+
(value,) = (
|
|
18
|
+
node.value
|
|
19
|
+
for node in module.body
|
|
20
|
+
if isinstance(node, ast.Assign)
|
|
21
|
+
and any(isinstance(target, ast.Name) and target.id == "__version__" for target in node.targets)
|
|
22
|
+
)
|
|
23
|
+
runtime_version = ast.literal_eval(value)
|
|
24
|
+
if runtime_version != distribution_version:
|
|
25
|
+
raise ValueError(
|
|
26
|
+
f"flashrwkv2.__version__ is {runtime_version}, "
|
|
27
|
+
f"but the distribution version is {distribution_version}"
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
13
31
|
def _copy_native_sources(destination: Path) -> None:
|
|
14
32
|
if destination.exists():
|
|
15
33
|
shutil.rmtree(destination)
|
|
@@ -20,6 +38,7 @@ class SourceBuildPy(build_py):
|
|
|
20
38
|
"""Include the native source tree without importing Torch or running NVCC."""
|
|
21
39
|
|
|
22
40
|
def run(self):
|
|
41
|
+
_check_runtime_version(self.distribution.get_version())
|
|
23
42
|
super().run()
|
|
24
43
|
_copy_native_sources(Path(self.build_lib) / "flashrwkv2" / "_csrc")
|
|
25
44
|
|
|
@@ -28,6 +47,7 @@ class SourceSdist(sdist):
|
|
|
28
47
|
"""Keep the same native source tree in source distributions."""
|
|
29
48
|
|
|
30
49
|
def make_release_tree(self, base_dir, files):
|
|
50
|
+
_check_runtime_version(self.distribution.get_version())
|
|
31
51
|
super().make_release_tree(base_dir, files)
|
|
32
52
|
_copy_native_sources(Path(base_dir) / "csrc")
|
|
33
53
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|