Hi Rajesh
It depends on the type of hardware and their associated capabilities, for example ES+ card on 7600 does this by default between L2, L3 and MPLS layers it does the matching automatically.
However, as a best practice and to maintain uniformity and ease of operational troubleshooting it is always good to have these markings configured using Cisco MQC in which you define class-maps end to end and mark traffic.
It is also good to have these just in case if the hardware malfunctions and the mapping is not done correctly.
Let me know if you are looking for anything more specific.
Regards
Vivek Ruhil