You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I found that hidet.ops.tan cannot work, the following is a part of traceback info:
Traceback (most recent call last):
File "/root/test/test/test.py", line 6, in <module>
y = ops.tan(hidet.from_torch(x))
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/graph/ops/arithmetic.py", line 893, in tan
return TanOp(x).outputs[0]
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/graph/ops/arithmetic.py", line 452, in __init__
super().__init__(x, op=lambda a: primitives.tan(a), name='tan')
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/graph/ops/arithmetic.py", line 268, in __init__
self.op = UnaryElementwiseOperation.from_callable(op, name, attributes, task_attributes)
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/graph/ops/arithmetic.py", line 46, in from_callable
y = op(x)
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/graph/ops/arithmetic.py", line 452, in <lambda>
super().__init__(x, op=lambda a: primitives.tan(a), name='tan')
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/ir/primitives/math.py", line 372, in tan
return generic_math_function_set.tan(a)
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/ir/primitives/math.py", line 253, in tan
return self.call('tan', a)
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/ir/primitives/math.py", line 241, in call
entry = lookup_primitive_function(f'generic_{name}')
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/ir/primitives/func.py", line 105, in lookup_primitive_function
return primitive_func_pool.lookup_by_name(name)
File "/root/miniconda3/envs/smore/lib/python3.10/site-packages/hidet/ir/primitives/func.py", line 77, in lookup_by_name
raise ValueError(
ValueError: Can not find primitive function with key: generic_tan, candidates:
generic_sin
generic_cos
generic_tanh
generic_exp
generic_round
generic_abs
generic_floor
generic_ceil
generic_sqrt
generic_rsqrt
generic_erf
...
Thanks so much for trying out Hidet and reporting this bug! This bug has already been fixed in our internal branch, which will be released as part of our 0.4.0 release milestone (i.e., end of June). As a reference to other people who might've encountered the same bug, I'll keep this issue open until 0.4.0 is actually released. Stay tuned!
Closes#450.
Output of the example code provided in the issue:
```
/home/jack/dev/hidet/venv/bin/python3.8 /home/jack/.config/JetBrains/RemoteDev-PY/_home_jack_dev_hidet/scratches/scratch_2.py
Compiling cpu task tan(x=float32(2, 2), y=float32(2, 2))...
Tensor(shape=(2, 2), dtype='float32', device='cpu')
[[ 0.2568644 -1.0825194]
[-32.35311 -1.5977247]]
```
Describe the bug
I found that
hidet.ops.tan
cannot work, the following is a part of traceback info:To Reproduce
The following is my code for test:
Expected behavior
I hope it work normally.
Enviroment
OS: Ubuntu 22.04
Others: hidet version: 0.3.0
The text was updated successfully, but these errors were encountered: