drbh
commited on
Commit
·
9ff7b2b
1
Parent(s):
846d481
feat: add build output
Browse files- build/torch26-cxx11-cu118-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx11-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx11-cu118-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch26-cxx11-cu124-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx11-cu124-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx11-cu124-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch26-cxx11-cu126-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx11-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx11-cu126-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch26-cxx98-cu118-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx98-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx98-cu118-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch26-cxx98-cu124-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx98-cu124-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx98-cu124-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch26-cxx98-cu126-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch26-cxx98-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch26-cxx98-cu126-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch27-cxx11-cu118-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch27-cxx11-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch27-cxx11-cu118-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch27-cxx11-cu126-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch27-cxx11-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch27-cxx11-cu126-x86_64-linux/img2gray/_ops.py +9 -0
- build/torch27-cxx11-cu128-x86_64-linux/img2gray/__init__.py +18 -0
- build/torch27-cxx11-cu128-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so +3 -0
- build/torch27-cxx11-cu128-x86_64-linux/img2gray/_ops.py +9 -0
- kernel-builder-logo-color.png +3 -0
- kernel-builder-logo-gray.png +3 -0
build/torch26-cxx11-cu118-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx11-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7330947ec6fc75db53623d4e5ab908b7d1466bb41b4cb2dff6ebd741189ac527
|
| 3 |
+
size 1803440
|
build/torch26-cxx11-cu118-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch26-cxx11-cu124-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx11-cu124-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49672a592c3303be0f048c83e642a5dd6750351d868eefcb8299bfdf7b6f1c4d
|
| 3 |
+
size 1844512
|
build/torch26-cxx11-cu124-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch26-cxx11-cu126-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx11-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef7a59de4ec0a141ef3823a70f65435828ce00960ed70f69b2766c58525379b4
|
| 3 |
+
size 1849040
|
build/torch26-cxx11-cu126-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch26-cxx98-cu118-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx98-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b95367a0cc078036ef1e76c2c6a0c54cc256ab94eebb95f91a748f44f94e1e01
|
| 3 |
+
size 1803360
|
build/torch26-cxx98-cu118-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch26-cxx98-cu124-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx98-cu124-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7d0d9aab366193f9ae18f89fffe0e3c690b1ae603bb1a22253efe4792f64dde
|
| 3 |
+
size 1844472
|
build/torch26-cxx98-cu124-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch26-cxx98-cu126-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch26-cxx98-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8650888e3b981f76543b519509778676888c930e12d764a7f72a922e77d1c10
|
| 3 |
+
size 1849008
|
build/torch26-cxx98-cu126-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch27-cxx11-cu118-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch27-cxx11-cu118-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8ffe0bad010abdb0caaf2ee5d53cbe7cb52c4af6a4ec6ca722c347ecbc9d7fd
|
| 3 |
+
size 1803536
|
build/torch27-cxx11-cu118-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch27-cxx11-cu126-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch27-cxx11-cu126-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:941e3b652042719a9a448e97c6479ccae8a7589bc63a1f64ab423ba651e0f139
|
| 3 |
+
size 1849072
|
build/torch27-cxx11-cu126-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
build/torch27-cxx11-cu128-x86_64-linux/img2gray/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
from ._ops import ops
|
| 4 |
+
|
| 5 |
+
def img2gray(input: torch.Tensor) -> torch.Tensor:
|
| 6 |
+
# we expect input to be in BCHW format
|
| 7 |
+
batch, channels, height, width = input.shape
|
| 8 |
+
|
| 9 |
+
assert channels == 3, "Input image must have 3 channels (RGB)"
|
| 10 |
+
|
| 11 |
+
output = torch.empty((batch, 1, height, width), device=input.device, dtype=input.dtype)
|
| 12 |
+
|
| 13 |
+
for b in range(batch):
|
| 14 |
+
single_image = input[b].permute(1, 2, 0).contiguous() # HWC
|
| 15 |
+
single_output = output[b].reshape(height, width) # HW
|
| 16 |
+
ops.img2gray(single_image, single_output)
|
| 17 |
+
|
| 18 |
+
return output
|
build/torch27-cxx11-cu128-x86_64-linux/img2gray/_img2gray_19700101000000.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4da2d5c1caee6afc38f5410ca88eace33cdcbf639daef4557b40ca08ab15b4bf
|
| 3 |
+
size 1920400
|
build/torch27-cxx11-cu128-x86_64-linux/img2gray/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _img2gray_19700101000000
|
| 3 |
+
ops = torch.ops._img2gray_19700101000000
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_img2gray_19700101000000::{op_name}"
|
kernel-builder-logo-color.png
ADDED
|
Git LFS Details
|
kernel-builder-logo-gray.png
ADDED
|
Git LFS Details
|