Skip to content

FuzzerFalse-0194896e-022a-7142-a84f-1f6108fe2437 #6645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

optimus-primal[bot]
Copy link

Gig seed=8948127177261462410 prob=0.99
Ran track: This automated PR permanently removes the GITAR_PLACEHOLDER feature flag.

Summary of Changes

Gitar found and removed uses of the GITAR_PLACEHOLDER feature flag across 15 files. Some of these files include:

  • datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/jackson/JacksonLineRecordReader.java
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/gradient/HardTanhBp.java
  • nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/buffer/BaseCpuDataBuffer.java
  • platform-tests/src/test/java/org/eclipse/deeplearning4j/dl4jcore/util/MovingWindowMatrixTest.java

Gitar performed deep cleanup and code optimizations triggered by the feature flag removal in 14 of these files.

Finally, after propagating cleanups across files, Gitar found additional cleanup opportunities in 8 other files.

Code Cleanup Details
  • datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/jackson/JacksonLineRecordReader.java

    • Replaced Feature Flag Usage
    • Cleaned up code (2 times)
      • Deleted the unused variable val
      • Propagated the value false to uses of the variable val
  • datavec/datavec-api/src/main/java/org/datavec/api/transform/ops/DispatchWithConditionOp.java

    • Replaced Feature Flag Usage (2 times)
    • Cleaned up code
      • Simplified control flow
  • deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/core/KerasReshape.java

    • Replaced Feature Flag Usage (15 times)
    • Cleaned up code (18 times)
      • Deleted the unused function listToLongArray
      • Deleted the unused variable innerConfig
      • Deleted the unused variable targetShape
      • Simplified control flow (13 times)
      • Deleted unused imports (2 times)
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java

    • Cleaned up code (79 times)
      • Deleted the unused variable bytes
      • Deleted the unused variable entry
      • Deleted the unused variable line
      • Deleted the unused variable name
      • Deleted the unused variable vocabCache
      • Deleted the unused variable word
      • Deleted unnecessary assignments to the variable entry
      • Deleted unnecessary assignments to the variable line
      • Propagated the value false to calls of the function addToken (15 times)
      • Propagated the value false to calls of the function containsWord
      • Propagated the value false to calls of the function elementAtIndex (10 times)
      • Propagated the value false to calls of the function equals (7 times)
      • Propagated the value false to calls of the function tokenFor (2 times)
      • Propagated the value false to calls of the function wordFor (2 times)
      • Propagated the value false to uses of the variable element
      • Propagated the value false to uses of the variable word
      • Simplified control flow (17 times)
      • Simplified boolean expressions (15 times)
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/SequenceVectors.java

    • Cleaned up code (4 times)
      • Propagated the value false to calls of the function tokenFor (2 times)
      • Propagated the value false to uses of the variable realElement (2 times)
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/serialization/VocabWordFactory.java

    • Replaced Feature Flag Usage (2 times)
    • Cleaned up code (2 times)
      • Deleted the unused variable ret
      • Propagated the value false to uses of the variable ret
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/VocabConstructor.java

    • Cleaned up code (3 times)
      • Propagated the value false to calls of the function hasToken
      • Simplified control flow
      • Simplified boolean expressions
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/VocabularyHolder.java

    • Cleaned up code (3 times)
      • Propagated the value false to calls of the function containsWord
      • Simplified control flow
      • Simplified boolean expressions
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/AbstractCache.java

    • Cleaned up code (16 times)
      • Deleted the unused variable that
      • Propagated the value false to calls of the function addToken
      • Propagated the value false to calls of the function containsWord (2 times)
      • Propagated the value false to calls of the function equals
      • Propagated the value false to calls of the function tokenFor (3 times)
      • Propagated the value false to calls of the function wordFor
      • Propagated the value false to uses of the variable token (3 times)
      • Simplified control flow (2 times)
      • Simplified boolean expressions (2 times)
  • deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java

    • Replaced Feature Flag Usage (23 times)
    • Cleaned up code (23 times)
      • Deleted the unused variable ret
      • Propagated the value false to calls of the function wordFor
      • Propagated the value false to uses of the variable ret
      • Propagated the value false to uses of the variable vw
      • Simplified control flow (15 times)
      • Simplified boolean expressions (4 times)
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/CustomOp.java

    • Replaced Feature Flag Usage
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce/custom/BatchMmul.java

    • Replaced Feature Flag Usage (8 times)
    • Cleaned up code (15 times)
      • Deleted the unused variable firstMatrix
      • Deleted the unused variable firstShape (3 times)
      • Deleted the unused variable lastMatrix
      • Deleted the unused variable lastShape (3 times)
      • Simplified control flow (7 times)
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/gradient/HardTanhBp.java

    • Replaced Feature Flag Usage (2 times)
    • Cleaned up code (2 times)
      • Simplified boolean expressions (2 times)
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/segment/bp/UnsortedSegmentSqrtNBp.java

    • Replaced Feature Flag Usage
    • Cleaned up code
      • Simplified boolean expressions
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/ELU.java

    • Replaced Feature Flag Usage
    • Cleaned up code
      • Simplified boolean expressions
  • nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/learning/NadamUpdater.java

    • Replaced Feature Flag Usage (4 times)
    • Cleaned up code (4 times)
      • Simplified control flow (4 times)
  • nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/buffer/BaseCpuDataBuffer.java

    • Replaced Feature Flag Usage (93 times)
    • Cleaned up code (156 times)
      • Deleted the unused variable cptr
      • Deleted the unused variable oldPointer
      • Deleted the unused variable ptr
      • Deleted unnecessary assignments to the variable allocationMode (11 times)
      • Deleted unnecessary assignments to the variable attached (4 times)
      • Deleted unnecessary assignments to the variable deallocationId (8 times)
      • Deleted unnecessary assignments to the variable elementSize
      • Deleted unnecessary assignments to the variable indexer (14 times)
      • Deleted unnecessary assignments to the variable offset (6 times)
      • Deleted unnecessary assignments to the variable originalOffset (6 times)
      • Deleted unnecessary assignments to the variable parentWorkspace (4 times)
      • Deleted unnecessary assignments to the variable workspaceGenerationId (5 times)
      • Propagated the value false to uses of the variable ptr
      • Simplified control flow (90 times)
      • Simplified boolean expressions
      • Deleted unused imports (2 times)
  • nd4j/nd4j-tvm/src/main/java/org/nd4j/tvm/util/TVMUtils.java

    • Replaced Feature Flag Usage (55 times)
    • Cleaned up code (91 times)
      • Deleted the unused variable bfloat16Indexer
      • Deleted the unused variable doubleIndexer
      • Deleted the unused variable float16Indexer
      • Deleted the unused variable floatIndexer
      • Deleted the unused variable int16Indexer
      • Deleted the unused variable int32Indexer
      • Deleted the unused variable int64Indexer
      • Deleted the unused variable int8Indexer
      • Deleted the unused variable pBfloat16
      • Deleted the unused variable pDouble
      • Deleted the unused variable pFloat16
      • Deleted the unused variable pFloat
      • Deleted the unused variable pInt16
      • Deleted the unused variable pInt32
      • Deleted the unused variable pInt64
      • Deleted the unused variable pInt8
      • Deleted the unused variable pUint16
      • Deleted the unused variable pUint32
      • Deleted the unused variable pUint64
      • Deleted the unused variable pUint8
      • Deleted the unused variable shape
      • Deleted the unused variable stride
      • Deleted the unused variable type
      • Deleted the unused variable uint16Indexer
      • Deleted the unused variable uint32Indexer
      • Deleted the unused variable uint64Indexer
      • Deleted the unused variable uint8Indexer
      • Propagated the value false to uses of the variable bfloat16Indexer
      • Propagated the value false to uses of the variable doubleIndexer
      • Propagated the value false to uses of the variable float16Indexer
      • Propagated the value false to uses of the variable floatIndexer
      • Propagated the value false to uses of the variable getBuffer
      • Propagated the value false to uses of the variable int16Indexer
      • Propagated the value false to uses of the variable int32Indexer
      • Propagated the value false to uses of the variable int64Indexer
      • Propagated the value false to uses of the variable int8Indexer
      • Propagated the value false to uses of the variable pBfloat16
      • Propagated the value false to uses of the variable pDouble
      • Propagated the value false to uses of the variable pFloat16
      • Propagated the value false to uses of the variable pFloat
      • Propagated the value false to uses of the variable pInt16
      • Propagated the value false to uses of the variable pInt32
      • Propagated the value false to uses of the variable pInt64
      • Propagated the value false to uses of the variable pInt8
      • Propagated the value false to uses of the variable pUint16
      • Propagated the value false to uses of the variable pUint32
      • Propagated the value false to uses of the variable pUint64
      • Propagated the value false to uses of the variable pUint8
      • Propagated the value false to uses of the variable type (13 times)
      • Propagated the value false to uses of the variable uint16Indexer
      • Propagated the value false to uses of the variable uint32Indexer
      • Propagated the value false to uses of the variable uint64Indexer
      • Propagated the value false to uses of the variable uint8Indexer
      • Simplified control flow (26 times)
  • platform-tests/src/test/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectorsTest.java

    • Cleaned up code (6 times)
      • Propagated the value false to calls of the function addToken
      • Propagated the value false to calls of the function equals
      • Propagated the value false to calls of the function tokenFor (2 times)
      • Simplified control flow
      • Simplified boolean expressions
  • platform-tests/src/test/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/AbstractCacheTest.java

    • Cleaned up code (35 times)
      • Deleted unnecessary assertions
      • Propagated the value false to calls of the function addToken (16 times)
      • Propagated the value false to calls of the function containsWord
      • Propagated the value false to calls of the function tokenFor
      • Simplified boolean expressions (16 times)
  • platform-tests/src/test/java/org/deeplearning4j/wordstore/InMemoryVocabStoreTests.java

    • Cleaned up code (4 times)
      • Deleted unnecessary assertions (2 times)
      • Propagated the value false to calls of the function containsWord (2 times)
  • platform-tests/src/test/java/org/eclipse/deeplearning4j/dl4jcore/nn/layers/samediff/SameDiffCustomLayerTests.java

    • Replaced Feature Flag Usage (6 times)
    • Cleaned up code (18 times)
      • Deleted the unused variable badInput (2 times)
      • Deleted the unused variable config (2 times)
      • Deleted the unused variable goodInput (2 times)
      • Propagated the value false to uses of the variable badInput (4 times)
      • Propagated the value false to uses of the variable config (2 times)
      • Propagated the value false to uses of the variable goodInput (4 times)
      • Deleted unused imports (2 times)
  • platform-tests/src/test/java/org/eclipse/deeplearning4j/dl4jcore/util/MovingWindowMatrixTest.java

    • Replaced Feature Flag Usage
    • Cleaned up code (3 times)
      • Deleted the unused variable ones
      • Propagated the value false to uses of the variable ones (2 times)

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.

1 participant