pymllm.mobile.ffi ================= .. py:module:: pymllm.mobile.ffi Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pymllm/mobile/ffi/base/index Attributes ---------- .. autoapisummary:: pymllm.mobile.ffi.MLLM_FIND_TORCH_AVAILABLE pymllm.mobile.ffi.MLLM_FIND_NUMPY_AVAILABLE pymllm.mobile.ffi.float32 pymllm.mobile.ffi.float16 pymllm.mobile.ffi.bfloat16 pymllm.mobile.ffi.int8 pymllm.mobile.ffi.int16 pymllm.mobile.ffi.int32 pymllm.mobile.ffi.int64 pymllm.mobile.ffi.uint8 pymllm.mobile.ffi.uint16 pymllm.mobile.ffi.uint32 pymllm.mobile.ffi.uint64 pymllm.mobile.ffi.boolean pymllm.mobile.ffi.cpu pymllm.mobile.ffi.cuda pymllm.mobile.ffi.qnn Classes ------- .. autoapisummary:: pymllm.mobile.ffi.Device pymllm.mobile.ffi.DType pymllm.mobile.ffi.Tensor pymllm.mobile.ffi.Session pymllm.mobile.ffi.ParameterFile pymllm.mobile.ffi.BaseOp pymllm.mobile.ffi.QnnDeviceAndContext pymllm.mobile.ffi.SoftmaxOpOptions pymllm.mobile.ffi.SoftmaxOp Functions --------- .. autoapisummary:: pymllm.mobile.ffi.echo pymllm.mobile.ffi.is_qnn_aot_on_x86_enabled pymllm.mobile.ffi.initialize_context pymllm.mobile.ffi.shutdown_context pymllm.mobile.ffi.float32_ pymllm.mobile.ffi.float16_ pymllm.mobile.ffi.bfloat16_ pymllm.mobile.ffi.int8_ pymllm.mobile.ffi.int16_ pymllm.mobile.ffi.int32_ pymllm.mobile.ffi.int64_ pymllm.mobile.ffi.uint8_ pymllm.mobile.ffi.uint16_ pymllm.mobile.ffi.uint32_ pymllm.mobile.ffi.uint64_ pymllm.mobile.ffi.bool_ pymllm.mobile.ffi.cpu_ pymllm.mobile.ffi.cuda_ pymllm.mobile.ffi.qnn_ pymllm.mobile.ffi.device pymllm.mobile.ffi.empty pymllm.mobile.ffi.zeros pymllm.mobile.ffi.ones pymllm.mobile.ffi.arange pymllm.mobile.ffi.random pymllm.mobile.ffi.is_torch_available pymllm.mobile.ffi.is_numpy_available pymllm.mobile.ffi.from_torch pymllm.mobile.ffi.from_numpy Package Contents ---------------- .. py:data:: MLLM_FIND_TORCH_AVAILABLE .. py:data:: MLLM_FIND_NUMPY_AVAILABLE .. py:function:: echo(rec) .. py:function:: is_qnn_aot_on_x86_enabled() .. py:function:: initialize_context() .. py:function:: shutdown_context() .. py:class:: Device Bases: :py:obj:`tvm_ffi.Object` .. py:method:: to_pod() .. py:class:: DType Bases: :py:obj:`tvm_ffi.Object` .. py:method:: to_pod() .. py:function:: float32_() .. py:function:: float16_() .. py:function:: bfloat16_() .. py:function:: int8_() .. py:function:: int16_() .. py:function:: int32_() .. py:function:: int64_() .. py:function:: uint8_() .. py:function:: uint16_() .. py:function:: uint32_() .. py:function:: uint64_() .. py:function:: bool_() .. py:function:: cpu_() .. py:function:: cuda_() .. py:function:: qnn_() .. py:class:: Tensor Bases: :py:obj:`tvm_ffi.Object` .. py:method:: __str__() .. py:property:: shape :type: tvm_ffi.Shape .. py:property:: dtype :type: DType .. py:property:: device :type: Device .. py:method:: tobytes() .. py:method:: __add__(other) .. py:method:: __sub__(other) .. py:method:: __mul__(other) .. py:method:: __div__(other) .. py:method:: __neg__(other) .. py:method:: abs() .. py:method:: clip(min_val, max_val) .. py:method:: min(dim = -1, keep_dim = False) .. py:method:: max(dim = -1, keep_dim = False) .. py:method:: sum(dim = -1, keep_dim = False) .. py:method:: mean(dim = -1, keep_dim = False) .. py:method:: transpose(dim0, dim1) .. py:property:: T :type: Tensor .. py:method:: view(shape) .. py:method:: unsqueeze(dim) .. py:method:: squeeze(dim) .. py:method:: permute(dims) .. py:method:: contiguous() .. py:method:: clone() .. py:method:: repeat(multiplier, dim) .. py:method:: to(dd) .. py:method:: cpu() .. py:method:: cuda() .. py:property:: name .. py:method:: set_name(name) .. py:method:: numel() .. py:property:: rank .. py:method:: is_contiguous() .. py:data:: float32 :type: DType .. py:data:: float16 :type: DType .. py:data:: bfloat16 :type: DType .. py:data:: int8 :type: DType .. py:data:: int16 :type: DType .. py:data:: int32 :type: DType .. py:data:: int64 :type: DType .. py:data:: uint8 :type: DType .. py:data:: uint16 :type: DType .. py:data:: uint32 :type: DType .. py:data:: uint64 :type: DType .. py:data:: boolean :type: DType .. py:data:: cpu :type: Device .. py:data:: cuda :type: Device .. py:data:: qnn :type: Device .. py:function:: device(device_type) .. py:function:: empty(shape, dtype = float32, device_type = cpu) .. py:function:: zeros(shape, dtype = float32, device_type = cpu) .. py:function:: ones(shape, dtype = float32, device_type = cpu) .. py:function:: arange(start, end, step = 1, dtype = float32, device_type = cpu) .. py:function:: random(shape, start = -1.0, end = 1.0, dtype = float32, device_type = cpu) .. py:function:: is_torch_available() .. py:function:: is_numpy_available() .. py:function:: from_torch(torch_tensor) .. py:function:: from_numpy(numpy_tensor) .. py:class:: Session Bases: :py:obj:`tvm_ffi.Object` .. py:class:: ParameterFile Bases: :py:obj:`tvm_ffi.Object` .. py:class:: BaseOp Bases: :py:obj:`tvm_ffi.Object` .. py:method:: load(pf) .. py:class:: QnnDeviceAndContext Bases: :py:obj:`tvm_ffi.Object` .. py:class:: SoftmaxOpOptions(dim=-1) Bases: :py:obj:`tvm_ffi.Object` .. py:class:: SoftmaxOp Bases: :py:obj:`BaseOp` .. py:method:: create(device, options) :staticmethod: