A literary device is a device that, when used in literary writing, creates an effect that deepens an understanding of the issue, problem, or insight being delivered.
A stylistic device is a kind of trick of writing that is interesting to look at or experience, or it’s something that becomes something of a trademark of the wrier, but does nothing to really deepen understanding.