tslearn-team / tslearn-team/tslearn
LearningShapelets is much slower on GPU than CPU
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 384
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 11
Description
I took following sample code from tslearn doc and executed on machine with GPU. The strange thing is, it's taking ~18min on GPU whereas code runs in few seconds on CPU.
Can you please tell whether the Shapelet Learning in tslearn has GPU support? If yes, do I need to explicitly specify that somewhere in source code. As I can see Matrix_Profile computation need implementation parameter to be specified as gpu_stump for GPU support. But I am not sure whether that is relate to LearningShapelets function or not.
Since I need to use it for large dataset, accelerating it with GPU is required for faster training.
Immediate help on this would be very much appreciated. Thanks

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented LearningShapelets example on the reported GPU and CPU setups, then inspect how LearningShapelets relates to Matrix_Profile and the gpu_stump implementation parameter. Confirm whether GPU execution is supported and identify the cause of the timing difference; done means the behavior and any required usage are documented or tracked with a reproducible fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100