liangsu9988 commited on
Commit
3a2b3fe
·
verified ·
1 Parent(s): 8fe28eb

Uploaded using `kernel-builder`.

Browse files
build/torch211-cxx11-cu128-x86_64-linux/{_fp4_gemm_cuda_92c4b99.abi3.so → _fp4_gemm_cuda_e79264b.abi3.so} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:63a46e5ec6142207d1f9f881d2d01238e219823e3e514b75ac232cab42d6c0be
3
- size 2207552
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbe7596eaa79c7ad1a54587c4836ac8284661fa029ef9ae1ed74b971cdd7a6e1
3
+ size 2088808
build/torch211-cxx11-cu128-x86_64-linux/_ops.py CHANGED
@@ -1,6 +1,9 @@
1
  import torch
2
- from . import _fp4_gemm_cuda_92c4b99
3
- ops = torch.ops._fp4_gemm_cuda_92c4b99
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
- return f"_fp4_gemm_cuda_92c4b99::{op_name}"
 
 
 
 
1
  import torch
2
+ from . import _fp4_gemm_cuda_e79264b
3
+ ops = torch.ops._fp4_gemm_cuda_e79264b
4
 
5
  def add_op_namespace_prefix(op_name: str):
6
+ """
7
+ Prefix op by namespace.
8
+ """
9
+ return f"_fp4_gemm_cuda_e79264b::{op_name}"
build/torch211-cxx11-cu128-x86_64-linux/fp4_gemm/__init__.py CHANGED
@@ -2,13 +2,25 @@ import ctypes
2
  import importlib.util
3
  import sys
4
  from pathlib import Path
 
5
 
6
- def _import_from_path(file_path: Path):
7
- path_hash = '{:x}'.format(ctypes.c_size_t(hash(file_path.absolute())).value)
8
- spec = importlib.util.spec_from_file_location(path_hash, file_path)
 
 
 
 
 
 
 
 
9
  module = importlib.util.module_from_spec(spec)
10
- sys.modules[path_hash] = module
11
- spec.loader.exec_module(module)
 
 
12
  return module
13
 
14
- globals().update(vars(_import_from_path(Path(__file__).parent.parent / '__init__.py')))
 
 
2
  import importlib.util
3
  import sys
4
  from pathlib import Path
5
+ from types import ModuleType
6
 
7
+
8
+ def _import_from_path(file_path: Path) -> ModuleType:
9
+ # We cannot use the module name as-is, after adding it to `sys.modules`,
10
+ # it would also be used for other imports. So, we make a module name that
11
+ # depends on the path for it to be unique using the hex-encoded hash of
12
+ # the path.
13
+ path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
14
+ module_name = path_hash
15
+ spec = importlib.util.spec_from_file_location(module_name, file_path)
16
+ if spec is None:
17
+ raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
18
  module = importlib.util.module_from_spec(spec)
19
+ if module is None:
20
+ raise ImportError(f"Cannot load module {module_name} from spec")
21
+ sys.modules[module_name] = module
22
+ spec.loader.exec_module(module) # type: ignore
23
  return module
24
 
25
+
26
+ globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
build/torch211-cxx11-cu128-x86_64-linux/metadata.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "fp4-gemm",
3
- "id": "_fp4_gemm_cuda_92c4b99",
4
  "version": 1,
5
  "license": "Apache-2.0",
6
  "python-depends": [],
@@ -14,19 +14,9 @@
14
  "algorithm": "sha256",
15
  "files": {
16
  "__init__.py": "Mr1/bAUzs+af68D+bRXX6iONDof//dzKgn6QU5pKdu8=",
17
- "_fp4_gemm_cuda_92c4b99.abi3.so": "Y6RuXsYUIgfR+fiB0tASOOIZgj4+UUt1rCMsq0LWwL4=",
18
- "_ops.py": "twu0zeqTyaITBKAdr9FudRbkbXpvBQdmAHcVf/OXw2I=",
19
- "fp4_gemm/__init__.py": "v6p5XMfQzddhi1fLSAw4HX9CyS0rQsidvu9VsT01xi4="
20
- }
21
- },
22
- "provenance": {
23
- "kernel": {
24
- "sha": "92c4b991b6f1fbd89744aa6f46f62b1bfac7ca7e",
25
- "dirty": false
26
- },
27
- "validation": {
28
- "torch": "2.11.0+cu128",
29
- "cuda": "12.8"
30
  }
31
  }
32
- }
 
1
  {
2
  "name": "fp4-gemm",
3
+ "id": "_fp4_gemm_cuda_e79264b",
4
  "version": 1,
5
  "license": "Apache-2.0",
6
  "python-depends": [],
 
14
  "algorithm": "sha256",
15
  "files": {
16
  "__init__.py": "Mr1/bAUzs+af68D+bRXX6iONDof//dzKgn6QU5pKdu8=",
17
+ "_fp4_gemm_cuda_e79264b.abi3.so": "y+dZbqp5x60aVFh8SDasgoRmH6Ap75rh7XS5cc3XpuE=",
18
+ "_ops.py": "R8mQX+2vC6Q0eFM37W/8tEtdmbSjYNVDtv/BySdH8kM=",
19
+ "fp4_gemm/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
 
 
 
 
 
 
 
 
 
 
20
  }
21
  }
22
+ }