fix the formatting of device_name based on the spec target type [finishes #83067198]