# Where is "conv1d” implemented?

**URL:** <https://discuss.pytorch.org/t/where-is-conv1d-implemented/33050>\
**Category:** nlp\
**Created:** [December 25, 2018, 9:53pm UTC](https://discuss.pytorch.org/t/where-is-conv1d-implemented/33050 "2018-12-25T21:53:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vabh](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/v/898d66/32.png) [@vabh](https://discuss.pytorch.org/u/vabh)\
**Post date:** [December 26, 2018, 6:28pm UTC](https://discuss.pytorch.org/t/where-is-conv1d-implemented/33050/3 "2018-12-26T18:28:58Z")

</div>

I believe the “handroll”-ed convolution is defined here: [https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/SpatialConvolutionMM.c](https://github.com/pytorch/pytorch/blob/master/aten/src/THNN/generic/SpatialConvolutionMM.c)

The NN module implementations are here: [https://github.com/pytorch/pytorch/tree/master/aten/src](https://github.com/pytorch/pytorch/tree/master/aten/src)  
The GPU version is in THCUNN and the CPU version in THNN

---

_[View the full topic](https://discuss.pytorch.org/t/where-is-conv1d-implemented/33050)._
