Towards Efficient IMC Accelerator Design Through Joint Hardware-Workload Co-optimization