How to read/write surface memory using CUDA Driver API

Hi.

I want to read/write surface memory using CUDA Driver API for enabling L2 cache on keplar GPU.

My program(code written with PTX) only using driver api, and I have to tune the code.

Can you please tell me how to?

Thank you.