TorchSharp icon indicating copy to clipboard operation
TorchSharp copied to clipboard

implementing fake_quantize_per_channel_affine

Open MovGP0 opened this issue 2 years ago • 8 comments

this PR contains the following changes:

  • implementation of torch.fake_quantize_per_channel_affine
  • cleanup of AdjustGamma class

MovGP0 avatar Mar 15 '23 18:03 MovGP0

Error in all builds:

test\TorchSharpTest\TestTorchTensor.cs(7771,19): error CS0623: Array initializers can only be used in a variable or field initializer. 

NiklasGustafsson avatar Mar 15 '23 22:03 NiklasGustafsson

@NiklasGustafsson the Array initializer should have been new double[,,] instead of new double[][][]. have fixed it in a new commit.

Remark: I should build and run tests before committing. However, my local build still doesn't work all the time, so using the CI is my workaround for now 😖

MovGP0 avatar Mar 16 '23 16:03 MovGP0

Remark: I should build and run tests before committing. However, my local build still doesn't work all the time, so using the CI is my workaround for now 😖

Understood. Here are test failures:

Failed TorchSharp.TestTensor.TestFakeQuantizePerChannelAffine [22 ms]
  Error Message:
   System.Runtime.InteropServices.ExternalException : !needs_dynamic_casting<func_t>::check(iter) INTERNAL ASSERT FAILED at "../aten/src/ATen/native/cpu/Loops.h":308, please report a bug to PyTorch. 
Exception raised from cpu_kernel at ../aten/src/ATen/native/cpu/Loops.h:308 (most recent call first):

NiklasGustafsson avatar Mar 16 '23 16:03 NiklasGustafsson

@MovGP0 -- ready to merge? If so, please add something to the top of the RELEASENOTES.md file explaining the API additions. We're working on 0.99.5 now -- planning to release it before the end of the week.

NiklasGustafsson avatar Apr 24 '23 19:04 NiklasGustafsson

Sorry, I had to make a release of 0.99.5 today.

NiklasGustafsson avatar Apr 26 '23 23:04 NiklasGustafsson

@MovGP0 -- Ping! Is this ready to merge? It'd be great to get a little one-line blurb on this change for the release notes.

NiklasGustafsson avatar May 16 '23 23:05 NiklasGustafsson

Sorry, I had to make a release of 0.99.5 today.

Hey, sorry that I reply this late. Have the championships this and next month and also a new job, so spending all my free time with training or learning 😔 Will probably find time in 4 weeks for further contributions 😊

MovGP0 avatar May 17 '23 17:05 MovGP0

@MovGP0 -- do you want to keep this PR open?

NiklasGustafsson avatar Oct 19 '23 20:10 NiklasGustafsson