Is changing the device in a CUDA Graph node unavailable?

I have tried to change the current device in CUDA graphs by creating this host node:

cudaGraph_t graph;

// Node #1: Create the 1st setDevice
cudaHostNodeParams hostNodeParams = {0};

memset(&hostNodeParams, 0, sizeof(hostNodeParams));
hostNodeParams.fn = [](void *data) {
  int passed_device_ordinal = *(int *)(data);
  cout << "CUDA-Graph: in the host node: changing the device to: "
        << passed_device_ordinal << endl;
hostNodeParams.userData = (void *)&device_1;

// Node #1: Add the 1st setDevice
CUDA_CHECK(cudaGraphAddHostNode(&setDevice_1, graph, &copy_0to1, 1,

When running the code, I get this output:

CUDA-Graph: in the host node: changing the device to: 1
Error operation not permitted at line 68 in file src/

Is it possible to change the device within a CUDA graph?