Skip to content

Commit 105478a

Browse files
test
1 parent dcf47f6 commit 105478a

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ requires = [
77
build-backend = "setuptools.build_meta"
88

99
[tool.cibuildwheel]
10-
environment = { cuda="12.9", temp="/tmp/cuda-temp" }
10+
environment = {
11+
CMAKE_ARGS = "-DCMAKE_C_COMPLIER=\\\"gcc\\\" -DCMAKE_CXX_COMPLIER=\\\"g++\\\" -DCMAKE_CUDA_COMPLIER=\\\"nvcc\\\""
12+
cuda="12.9"
13+
temp="/tmp/cuda-temp"
14+
}
1115
xbuild-tools = ["cmake", "ninja"]
1216

1317
[tool.cibuildwheel.linux]

src/tensor_array/core/tensor.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,12 @@ def __abs__(self) -> Tensor:
339339
Tensor: A new tensor with the absolute values.
340340
"""
341341
return super().__abs__()
342+
343+
def _hash__(self) -> int:
344+
"""
345+
Returns a hash value for the tensor.
346+
Returns:
347+
int: A hash value representing the tensor.
348+
This method is useful for using tensors as keys in dictionaries or sets.
349+
"""
350+
return super()._hash__()

0 commit comments

Comments
 (0)