Software Techniques To Enhance Reliability Of Emerging Compute And Memory Units