How To Control the Number of Streaming Processors Can be Used for Computing

Is there any way to control the number of streaming processors for CUDA Computing?

For example, when we just want to use half of the streaming processors or any number of the streaming processor, to run our CUDA program to test the performance.