class_docstr: Hexagon Device Session
  
  Parameters
  ----------
  remote_workspace : Union[str, pathlib.Path]
      Remote workspace path
  
  rpc_tracker : tuple(str, int)
      RPC tracker host and port number.
  
  rpc_server_key : str
      RPC server key on remote device.
  
  serial_number : str
      Device serial number. `simulator` used for hexagon simulator.
  
  session_name : str
      Hexagon RPC session name.
  
  remote_stack_size_bytes : int
      The stack size of the remote device, to be passed to
      tvm.contrib.hexagon.create_hexagon_session.
  
  rpc_receive_buffer_size_bytes : int
      RPC receive buffer size in bytes.
class_docstr_tok: ["Hexagon","Device","Session","Parameters","--","--","--","--","--","remote_workspace",":","Union","[","str",",","pathlib.Path","]","Remote","workspace","path","rpc_tracker",":","tuple","(","str",",","int",")","RPC","tracker","host","and","port","number",".","rpc_server_key",":","str","RPC","server","key","on","remote","device",".","serial_number",":","str","Device","serial","number",".","`","simulator","`","used","for","hexagon","simulator",".","session_name",":","str","Hexagon","RPC","session","name",".","remote_stack_size_bytes",":","int","The","stack","size","of","the","remote","device",",","to","be","passed","to","tvm.contrib.hexagon.create_hexagon_session",".","rpc_receive_buffer_size_bytes",":","int","RPC","receive","buffer","size","in","bytes","."]
docstr: Upload a local file to the remote workspace.
  
  Parameters
  ----------
  local_path : str or pathlib.Path
      Path to the local file to be copied.
  remote_filename : str
      Name of the file in the remote workspace.
  
  Returns
  -------
  pathlib.Path :
      Uploaded file remote path.
docstr_tok: ["Upload","a","local","file","to","the","remote","workspace",".","Parameters","--","--","--","--","--","local_path",":","str","or","pathlib.Path","Path","to","the","local","file","to","be","copied",".","remote_filename",":","str","Name","of","the","file","in","the","remote","workspace",".","Returns","--","--","--","-","pathlib.Path",":","Uploaded","file","remote","path","."]
code: def upload(
      self, local_path: Union[str, pathlib.Path], remote_filename: str
  ) -> pathlib.Path:
      """Upload a local file to the remote workspace.
  
      Parameters
      ----------
      local_path : str or pathlib.Path
          Path to the local file to be copied.
      remote_filename : str
          Name of the file in the remote workspace.
  
      Returns
      -------
      pathlib.Path :
          Uploaded file remote path.
      """
      upload_func = self._rpc.get_function("tvm.rpc.server.upload")
      remote_path = f"{self._workspace}/{remote_filename}"
      with open(local_path, mode="rb") as src_f:
          data = bytearray(src_f.read())
      upload_func(remote_path, data)
      return remote_path
  
imports: import os
  import pathlib
  import tempfile
  from typing import Union
  import tvm
  from tvm import rpc
  import tvm.contrib.hexagon
  from tvm.relay.backend.executor_factory import ExecutorFactoryModule, AOTExecutorFactoryModule, GraphExecutorFactoryModule
  from .tools import export_module, HEXAGON_SIMULATOR_NAME
label_desc: Use image node_id 7 for calling the Session obj's underlying member method code with example usage: obj.upload(local_path, remote_filename) and returns: remote_path