FlatSharp icon indicating copy to clipboard operation
FlatSharp copied to clipboard

Request support for "force_align" attribute

Open dje-dev opened this issue 9 months ago • 3 comments

This package looks exceptionally useful but unfortunately lacks support for the "force_align" attribute.

It is commonly used, for example in the definition of Microsoft's ONNX adapter files for LoRA (https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/lora/adapter_format/adapter_schema.fbs).

But perhaps there is some reason why this is difficult/impossible in a .NET library (?).

dje-dev avatar Feb 17 '25 14:02 dje-dev

No reason that this is impossible or difficult. Just not something that anyone has ever asked for. I need to do some research to understand the implications of force_align and all the contexts where it is valid.

jamescourtney avatar Feb 18 '25 00:02 jamescourtney

Thanks. I should add that I simply removed that attribute from the definition file and have not found any problems, so this turns out to probably not be a blocking issue in my scenario.

dje-dev avatar Feb 20 '25 13:02 dje-dev

That doesn't surprise me based on the schema. The place that force_align will really matter is in a struct definition (and I'm not even sure the attribute is valid in that context). In tables, things are stored by offset, so you won't notice it unless your library validates alignment on read or your architecture doesn't support unaligned memory access.


From: dje-dev @.> Sent: Thursday, February 20, 2025 2:37:33 PM To: jamescourtney/FlatSharp @.> Cc: Comment @.>; Subscribed @.> Subject: Re: [jamescourtney/FlatSharp] Request support for "force_align" attribute (Issue #460)

Thanks. I should add that I simply removed that attribute from the definition file and have not found any problems, so this turns out to probably not be a blocking issue in my scenario.

— Reply to this email directly, view it on GitHubhttps://github.com/jamescourtney/FlatSharp/issues/460#issuecomment-2671525149 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUDYYHBLL36LJ4DXGHILBD2QXLBTBFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIYTAOBUGMZDAOJVHGSG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJRGUZDCOJXGY3TNAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDEOBVHAYDSNRRHE4YFJDUPFYGLJLMMFRGK3FFOZQWY5LFVIYTAOBUGMZDAOJVHGTXI4TJM5TWK4VGMNZGKYLUMU. You are receiving this email because you commented on the thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jamescourtney avatar Feb 20 '25 13:02 jamescourtney