input: move device and context to a specific file

19 jobs for !1824 with dec-dev-move in 17 minutes and 50 seconds (queued for 4 seconds)
merge request