make function compilation process treat TensorStorageVariable as a
SharedVariable