Comments (3)
I'm having a similar issue when trying to import triton:
ImportError: Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/triton/_C/libtriton.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationESs
Using ldd -r libtriton.so shows the following:
linux-vdso.so.1 (0x00007ffc6c9ea000)
libLLVM-9.so.1 => /usr/lib/llvm-9/lib/libLLVM-9.so.1 (0x00007f7c8f080000)
libc10_cuda.so => /home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/torch/lib/libc10_cuda.so (0x00007f7c8ee48000)
libtorch_cpu.so => /home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so (0x00007f7c87bb2000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7c87829000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7c87611000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7c87220000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7c936dc000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f7c87018000)
libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007f7c86de1000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7c86bc4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7c869bc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7c867b8000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f7c8658e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7c8636f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7c85fd1000)
libcudart.so.10.2 => /usr/local/cuda/lib64/libcudart.so.10.2 (0x00007f7c85d53000)
libc10.so => /home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/torch/lib/libc10.so (0x00007f7c85add000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f7c858ae000)
libmkl_intel_lp64.so => /home/nathaniel/Programs/anaconda3/lib/libmkl_intel_lp64.so (0x00007f7c84d42000)
libmkl_gnu_thread.so => /home/nathaniel/Programs/anaconda3/lib/libmkl_gnu_thread.so (0x00007f7c83469000)
libmkl_core.so => /home/nathaniel/Programs/anaconda3/lib/libmkl_core.so (0x00007f7c7f149000)
undefined symbol: PyInstanceMethod_Type (./libtriton.so)
undefined symbol: PyExc_RuntimeError (./libtriton.so)
undefined symbol: PyExc_MemoryError (./libtriton.so)
undefined symbol: PyBaseObject_Type (./libtriton.so)
undefined symbol: PyModule_Type (./libtriton.so)
undefined symbol: PyExc_TypeError (./libtriton.so)
undefined symbol: PyCFunction_Type (./libtriton.so)
undefined symbol: PyMethod_Type (./libtriton.so)
undefined symbol: PyExc_ImportError (./libtriton.so)
undefined symbol: PyExc_ValueError (./libtriton.so)
undefined symbol: _Py_FalseStruct (./libtriton.so)
undefined symbol: PyDict_Type (./libtriton.so)
undefined symbol: PyExc_BufferError (./libtriton.so)
undefined symbol: PyType_Type (./libtriton.so)
undefined symbol: PyProperty_Type (./libtriton.so)
undefined symbol: _Py_NoneStruct (./libtriton.so)
undefined symbol: _Py_NotImplementedStruct (./libtriton.so)
undefined symbol: PyExc_SystemError (./libtriton.so)
undefined symbol: PyCapsule_Type (./libtriton.so)
undefined symbol: _Py_TrueStruct (./libtriton.so)
undefined symbol: PyFloat_Type (./libtriton.so)
undefined symbol: PyExc_IndexError (./libtriton.so)
undefined symbol: PyDict_DelItemString (./libtriton.so)
undefined symbol: _Py_Dealloc (./libtriton.so)
undefined symbol: PyLong_FromLong (./libtriton.so)
undefined symbol: PyModule_Create2 (./libtriton.so)
undefined symbol: PyLong_FromSsize_t (./libtriton.so)
undefined symbol: PyObject_SetAttrString (./libtriton.so)
undefined symbol: PyType_IsSubtype (./libtriton.so)
undefined symbol: PyErr_Fetch (./libtriton.so)
undefined symbol: PyException_SetTraceback (./libtriton.so)
undefined symbol: PyDict_Copy (./libtriton.so)
undefined symbol: _PyThreadState_UncheckedGet (./libtriton.so)
undefined symbol: PyDict_Size (./libtriton.so)
undefined symbol: PyUnicode_DecodeUTF8 (./libtriton.so)
undefined symbol: PyUnicode_FromString (./libtriton.so)
undefined symbol: PyNumber_Check (./libtriton.so)
undefined symbol: PyThread_tss_create (./libtriton.so)
undefined symbol: PyObject_HasAttrString (./libtriton.so)
undefined symbol: PyObject_GetBuffer (./libtriton.so)
undefined symbol: PyBytes_AsString (./libtriton.so)
undefined symbol: PyCapsule_GetContext (./libtriton.so)
undefined symbol: _PyType_Lookup (./libtriton.so)
undefined symbol: PyThreadState_Clear (./libtriton.so)
undefined symbol: PyErr_Clear (./libtriton.so)
undefined symbol: PyCallable_Check (./libtriton.so)
undefined symbol: PyNumber_Xor (./libtriton.so)
undefined symbol: PyCapsule_New (./libtriton.so)
undefined symbol: PyMem_Calloc (./libtriton.so)
undefined symbol: PyErr_ExceptionMatches (./libtriton.so)
undefined symbol: PyBuffer_Release (./libtriton.so)
undefined symbol: PyBytes_Size (./libtriton.so)
undefined symbol: PyNumber_Or (./libtriton.so)
undefined symbol: PySequence_Size (./libtriton.so)
undefined symbol: PyLong_AsUnsignedLong (./libtriton.so)
undefined symbol: PyEval_InitThreads (./libtriton.so)
undefined symbol: PyNumber_Long (./libtriton.so)
undefined symbol: PyType_Ready (./libtriton.so)
undefined symbol: PyTuple_GetItem (./libtriton.so)
undefined symbol: _PyObject_GetDictPtr (./libtriton.so)
undefined symbol: PyObject_Malloc (./libtriton.so)
undefined symbol: PyTuple_SetItem (./libtriton.so)
undefined symbol: PyThread_tss_get (./libtriton.so)
undefined symbol: PyErr_Restore (./libtriton.so)
undefined symbol: PyThread_tss_alloc (./libtriton.so)
undefined symbol: PyLong_FromSize_t (./libtriton.so)
undefined symbol: PyList_Size (./libtriton.so)
undefined symbol: PyGILState_GetThisThreadState (./libtriton.so)
undefined symbol: PyBytes_AsStringAndSize (./libtriton.so)
undefined symbol: PyUnicode_AsEncodedString (./libtriton.so)
undefined symbol: PyTuple_New (./libtriton.so)
undefined symbol: PyObject_CallFunctionObjArgs (./libtriton.so)
undefined symbol: PyErr_Occurred (./libtriton.so)
undefined symbol: PyThreadState_DeleteCurrent (./libtriton.so)
undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationESs (./libtriton.so)
undefined symbol: PySequence_Tuple (./libtriton.so)
undefined symbol: PyWeakref_NewRef (./libtriton.so)
undefined symbol: PyUnicode_AsUTF8String (./libtriton.so)
undefined symbol: PyEval_GetBuiltins (./libtriton.so)
undefined symbol: PyUnicode_FromFormat (./libtriton.so)
undefined symbol: PyNumber_And (./libtriton.so)
undefined symbol: PyCapsule_GetName (./libtriton.so)
undefined symbol: PyEval_AcquireThread (./libtriton.so)
undefined symbol: PyErr_SetString (./libtriton.so)
undefined symbol: PyObject_CallObject (./libtriton.so)
undefined symbol: PyThread_tss_set (./libtriton.so)
undefined symbol: PyList_GetItem (./libtriton.so)
undefined symbol: PyObject_IsInstance (./libtriton.so)
undefined symbol: PyList_Append (./libtriton.so)
undefined symbol: PyMem_Free (./libtriton.so)
undefined symbol: PyThreadState_Get (./libtriton.so)
undefined symbol: PyThreadState_New (./libtriton.so)
undefined symbol: PyObject_Repr (./libtriton.so)
undefined symbol: PyFrame_GetLineNumber (./libtriton.so)
undefined symbol: PyErr_NormalizeException (./libtriton.so)
undefined symbol: PyObject_ClearWeakRefs (./libtriton.so)
undefined symbol: PyDict_Next (./libtriton.so)
undefined symbol: PyCapsule_GetPointer (./libtriton.so)
undefined symbol: PyInstanceMethod_New (./libtriton.so)
undefined symbol: PyDict_New (./libtriton.so)
undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs (./libtriton.so)
undefined symbol: PyObject_RichCompareBool (./libtriton.so)
undefined symbol: PyModule_AddObject (./libtriton.so)
undefined symbol: PySequence_GetItem (./libtriton.so)
undefined symbol: PyObject_GetItem (./libtriton.so)
undefined symbol: PyObject_SetItem (./libtriton.so)
undefined symbol: PyDict_Contains (./libtriton.so)
undefined symbol: PyDict_GetItemString (./libtriton.so)
undefined symbol: _ZN3c106detail12infer_schema20make_function_schemaEOSsS2_NS_8ArrayRefINS1_11ArgumentDefEEES5_ (./libtriton.so)
undefined symbol: PyLong_AsLong (./libtriton.so)
undefined symbol: PyEval_SaveThread (./libtriton.so)
undefined symbol: PyCapsule_SetContext (./libtriton.so)
undefined symbol: Py_GetVersion (./libtriton.so)
undefined symbol: PySequence_Check (./libtriton.so)
undefined symbol: PyObject_GetAttrString (./libtriton.so)
undefined symbol: PyList_New (./libtriton.so)
undefined symbol: PyObject_Str (./libtriton.so)
undefined symbol: PyErr_Format (./libtriton.so)
undefined symbol: PyObject_SetAttr (./libtriton.so)
undefined symbol: PyCFunction_NewEx (./libtriton.so)
undefined symbol: PyTuple_Size (./libtriton.so)
EDIT: If I set -D_GLIBCXX_USE_CXX11_ABI=1
in CMakeLists.txt before compiling, I no longer get an import error. However, now running python einsum.py
gives the following error:
Traceback (most recent call last):
File "einsum.py", line 195, in <module>
triton.ops.einsum(expr, ta, tb, tc, arrays = arrays, bench = True)
AttributeError: module 'triton' has no attribute 'ops'
And if I try python -c import triton.ops
, I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/triton/python/triton/ops/__init__.py", line 1, in <module>
from .einsum import _einsum, einsum
File "/home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/triton/python/triton/ops/einsum.py", line 19, in <module>
class _einsum(torch.autograd.Function):
File "/home/nathaniel/Programs/anaconda3/envs/nlp/lib/python3.8/site-packages/triton/python/triton/ops/einsum.py", line 642, in _einsum
registry = triton.utils.id_dict()
AttributeError: module 'triton' has no attribute 'utils'
from triton.
Hi!
Sorry for the delay. I was settling down for a new job and somehow missed this issue. I think that the triton.ops submodule is pretty much deprecated. I am working on a separate branch on bringing this up to date, mostly with block-sparse einsum operations, so I think that the error you're getting with respect to the "ops" and "utils" module are "normal".
The -D_GLIBCXX_USE_CXX11_ABI=1 part is a bit odd, as I thought I was setting this option depending on what torch had been compiled with, but I will look into this!
from triton.
Great, thanks for the information. If triton.ops is deprecated, then it seems that my installation was successful when using -D_GLIBCXX_USE_CXX11_ABI=1.
from triton.
Related Issues (20)
- Use TRITON_CACHE in setup.py so that .triton must not have to be in home directory of user HOT 1
- Can't install triton HOT 1
- Flash Attention 3 --> Triton HOT 1
- Mistakes in `class DistributedEncoding`'s illustration
- Latest nightly triton causes my custom fused attention kernel to output incorrect results. HOT 3
- Unexpected segmentation fault with tl.sum in a simple loop HOT 3
- Support reduction operations on global memory with `red` ptx instruction
- Cannot use Triton interpreter with matrix multiply example HOT 4
- error: fp8e4nv data type is not supported on CUDA arch < 89
- Can I explicitly specify the "tl.load" to load data into shared memory? HOT 1
- breaking change to constexpr in triton 3.0.0 HOT 2
- AttributeError: 'InterpretedFunction' object has no attribute 'cache_key' HOT 2
- SWP: use of address of iterator in dist1Cluster HOT 1
- Introduce `tl.assume` or use `assert` expression in non-debug builds to guide optimization?
- run into dead loop when tuning the tma persistent kernel HOT 6
- [BUG] error load fp32 value from 2D tensor HOT 2
- [BUG] device_print - Triton nightly, 3.0 incorrect values (zero) when using pointer arithmetics(constexpr etc.) other than with triton.language.arange HOT 3
- Incompatible type error with "torch.onnx.export()"
- Syncing blocks in SplitK GEMM HOT 1
- [BUG] triton.language.associative_scan returning incorrect results when `reverse=True`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from triton.