Skip to content

Conversation

@arunetm-zz
Copy link
Contributor

Change description:

  1. Implemented support for the following new SIMD types. This adds to the existing SIMD types (Int32x4 and Float32x4) and meets the SIMD.js specification. [SIMD.Bool32x4, SIMD.Bool16x8, SIMD.Bool8x16, SIMD.Int16x8, SIMD.Int8x16, SIMD.Uint32x4, SIMD.Uint16x8, SIMD.Uint8x16]
  2. Adding new builtin functions for all SIMD types to be consistent with the SIMD.js specification and the polyfill.
  3. Updating the syntax and behavior of the existing builtin functions and removing builtins to be consistent with the SIMD.js specification and the polyfill.
  4. Clean up of existing SIMD unittests to avoid printing SIMD values for validation. Tests prints only PASS/FAIL while verification and uses utility methods for comparing the values to the right precision.
  5. Code refactoring to reduce code size/complexity of the SIMDjs code.

@msftclas
Copy link

Hi @arunetm, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Arun Purushan (Intel Corp)). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@arunetm-zz
Copy link
Contributor Author

Change description:
1.Implemented support for the following new SIMD types. This adds to the existing SIMD types (Int32x4 and Float32x4) and meets the SIMD.js specification. [SIMD.Bool32x4, SIMD.Bool16x8, SIMD.Bool8x16, SIMD.Int16x8, SIMD.Int8x16, SIMD.Uint32x4, SIMD.Uint16x8, SIMD.Uint8x16]
2.Adding new builtin functions for all SIMD types to be consistent with the SIMD.js specification and the polyfill.
3.Updating the syntax and behavior of the existing builtin functions and removing builtins to be consistent with the SIMD.js specification and the polyfill.
4.Clean up of existing SIMD unittests to avoid printing SIMD values for validation. Tests prints only PASS/FAIL while verification and uses utility methods for comparing the values to the right precision.
5.Code refactoring to reduce code size/complexity of the SIMDjs code.

@dilijev dilijev mentioned this pull request Jan 14, 2016
@abchatra abchatra self-assigned this Jan 14, 2016
@dilijev
Copy link
Contributor

dilijev commented Jan 14, 2016

Updated description of the issue so the text will show up in the merge commit message.

@dilijev
Copy link
Contributor

dilijev commented Jan 14, 2016

@arunetm It looks like some of your copyright headers are incorrect or missing.

In the generated Promise.js.bc.*.h:

$ head lib/Runtime/Library/InJavascript/Promise.js.bc.32b.h
// Copyright (C) Microsoft. All rights reserved.
#if 0
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

Compare with:

$ head lib/Runtime/Library/InJavascript/intl.js.bc.32b.h
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#if 0
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

Although I believe there is no use for the Promise bytecodes in ChakraCore. Can you confirm whether they are needed in ChakraCore for your change, and if not, remove them?

@dilijev
Copy link
Contributor

dilijev commented Jan 14, 2016

Full list of files missing or wrong copyright from the failed check:

11:54:31 --------------
11:54:31 --- ERRORS ---
11:54:31 lib/Runtime/Library/InJavascript/Promise.js.bc.32b.h ... does not contain a correct Microsoft copyright notice.
11:54:31 lib/Runtime/Library/InJavascript/Promise.js.bc.64b.h ... does not contain a correct Microsoft copyright notice.
11:54:31 test/SIMD.int32x4/testLoad.js ... does not contain a correct Microsoft copyright notice.
11:54:31 test/SIMD.int32x4/testMinMax.js ... does not contain a correct Microsoft copyright notice.
11:54:31 test/SIMD.int32x4/testStore.js ... does not contain a correct Microsoft copyright notice.
11:54:31 --------------

@arunetm-zz
Copy link
Contributor Author

Thanks @dilijev. Updated the PR by removing unused bytecode headers and adding missing copyright header for the test files.

@tcare
Copy link
Contributor

tcare commented Jan 14, 2016

Were these generated by the header script? We might need to update some more of that with the license header changes. @akroshg will have more context (but is away for a few more weeks)

@arunetm-zz
Copy link
Contributor Author

@tcare, We might not need any script updates for this. The Promise.js.bc.*.h files were generated by the Genbytecode script a while back. However the latest script does not create these files anymore.

@tcare
Copy link
Contributor

tcare commented Jan 14, 2016

Ah, okay. Thanks for the clarification.

@abchatra
Copy link
Contributor

Does all the kangax es7 test cases pass after this change?

@abchatra
Copy link
Contributor

Why doesn't this change remove SIMDFloat64x2?

@arunetm-zz
Copy link
Contributor Author

@abchatra,We have not verified this feature against the 'kangax es7' tests. We do pass the SIMD validation tests from the SIMDjs polyfill (link below).
https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd_tests.js
These tests are consistent with the latest SIMD spec and we pass all of them.

@arunetm-zz
Copy link
Contributor Author

@abchatra There is a possibility for the Float64x2 SIMD type to be re introduced to the SIMD spec based on some of the on going discussions(tc39/ecmascript_simd#304).
We are planning to have a clean up PR after performing multiple cleanups including this type (in case Float64x2 is decided again to be omitted from the specification).

@arunetm-zz
Copy link
Contributor Author

Using telemetry for SIMD library builtins:
The ideal use cases for SIMD builtin functions will follow the optimized versions of their implementation. The current library implementation is meant for spec coverage and they will be used only in rare cases. Collecting the telemetry for the optimized builtins might be more useful than capturing the information for the library implementations.

Testing:
The SIMD builtins has been verified against the polyfill validation tests https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd_tests.js, to ensure consistency with the latest SIMD specification. The implementation passes all of these polyfill tests.

We have not tried testing against "kangax es7" tests so far. Planning to verigy against the kangax es7 tests as the next step.

@abchatra
Copy link
Contributor

@arunetm Do you have a new commit which I review and signoff?

@arunetm-zz
Copy link
Contributor Author

@abchatra The commit 2af6118 is ready for review. Thanks.

@abchatra
Copy link
Contributor

👍 Great job!

@arunetm-zz
Copy link
Contributor Author

@abchatra Thanks for the feedback.
I have an authorization issue for the code sign off. The tool complains that my account is not authorized. Can you please help to sign off this PR.

@abchatra
Copy link
Contributor

@arunetm Done.

@dilijev
Copy link
Contributor

dilijev commented Jan 25, 2016

@dotnet-bot test EOL Check please

Change description:

1. Implemented support for new SIMD types SIMD.Bool32x4, SIMD.Bool16x8,
SIMD.Bool8x16, SIMD.Int16x8,SIMD.Int8x16, SIMD.Uint32x4, SIMD.Uint16x8,
SIMD.Uint8x16. This adds to the existing types SIMD.Int32x4 and
SIMD.Float32x4 ensuring compatability with the latest SIMDjs specification.

2. Adding new builtin functions for all SIMDJs types to be consistent with the
SIMD.js specification and the polyfill implemntation. This is validated
against the polyfill tests.

3. Updating the syntax and behavior of the existing builtin functions and
removing builtins to be consistent with the SIMD.js specification and the
polyfill.

4. Clean up of existing SIMD unittests to avoid printing SIMD values for
validation. Tests prints only PASS/FAIL while verification and uses
utility methods for comparing the values to the right precision. This
avoids unittest dependency on the printing of numbers.

5. Code refactoring to reduce code size/complexity of the SIMDjs code.
@chakrabot chakrabot merged commit 0af32b1 into chakra-core:master Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants