Solved by googlebot in post #2 
              
              
                module.register_buffer(“x”, tensor(…)), but for scalars a simple attribute (module.pi = 3.14) is sometimes better, both are auto-transfered to gpu.